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 / avinash
because there us no break statement after case
Is This Answer Correct ? | 6 Yes | 0 No |
Post New Answer View All Answers
Why static variable is used in c?
Given only putchar (no sprintf, itoa, etc.) write a routine putlong that prints out an unsigned long in decimal. [ I gave the obvious solution of taking % 10 and / 10, which gives us the decimal value in reverse order. This requires an array since we need to print it out in the correct order. The interviewer wasn't too pleased and asked me to give a solution which didn't need the array ].
What is bss in c?
Why we use int main and void main?
What are qualifiers in c?
What does 3 periods mean in texting?
What the advantages of using Unions?
How can I split up a string into whitespace-separated fields?
What is identifiers in c with examples?
How can you tell whether two strings are the same?
Are the expressions * ptr ++ and ++ * ptr same?
main() { int i = 10; printf(" %d %d %d ", ++i, i++, ++i); }
What is the use of header?
How many keywords are there in c?
What are the benefits of c language?