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);
}
Answers were Sorted based on User's Feedback
Answer / tejal
k=4 bcoz of this control directly switch to case 4 ,now i
holds the value 400 there is no any break statement after
case 4 so now control goes to case 5 and assign value of i
as 500 .now control comes out of the loop and print the
valus of i i.e. 500.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is difference between the following 2 lines…. int temp = (int)(0x00); int temp = (0x00int);
what is stack , heap ,code segment,and data segment
What is cohesion and coupling in c?
what is the output of the program?? #include<stdio.h> main ( ) { int a=010,sum=0,tracker: for(tracker=0;tracker<=a;tracker++) sum+=tracker; printf(“ %d\n”,sum); } what is the difference between a=10 and a=010??
1 232 34543 4567654 can anyone tell me how to slove this c question
Explain what is the purpose of "extern" keyword in a function declaration?
Total of how many functions are available in c?
WAP to accept first name,middle name & last name of a student display its initials?
Write a C program to check a number even or odd, without using any relational, arithmetic operator and any loops.
What is the advantage of c?
Can we initialize extern variable in c?
Is struct oop?