what is the output of the program and explain why??
#include<stdio.h>
void main ( )
{
int k=4,j=0:
switch (k)
{
case 3;
j=300;
case 4:
j=400:
case 5:
j=500;
}
printf (ā%d\nā,j);
}
Answer Posted / amik
the answer will b 500 becoz...when first k = 4 is
executing...the value of j is 400 den thr is no break
statement...so it will continue..nd at the end of the
switch..j will contain or retain.. the value 500
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
Why is python slower than c?
How many levels of pointers can you have?
What is pass by value in c?
What is static and auto variables in c?
Why do we need functions in c?
What are structures and unions? State differencves between them.
What is #define in c?
Write a program to check palindrome number in c programming?
What is function and its example?
What is the general form of #line preprocessor?
In c language can we compile a program without main() function?
What is sizeof int in c?
Write a function expand(s1,s2) that expands shorthand notations like a-z in the string s1 into the equivalent complete list abc...xyz in s2 . Allow for letters of either case and digits, and be prepared to handle cases like a-b-c and a-z0-9 and -a-z. z-a:zyx......ba -1-6-:-123456- 1-9-1:123456789987654321 a-R-L:a-R...L a-b-c:abbc
What do you mean by keywords in c?
Differentiate abs() function from fabs() function.