main()
{
float i=1.5;
switch(i)
{
case 1: printf("1");
case 2: printf("2");
default : printf("0");
}
}
Answers were Sorted based on User's Feedback
Answer / susie
Answer :
Compiler Error: switch expression not integral
Explanation:
Switch statements can be applied only to integral types.
| Is This Answer Correct ? | 16 Yes | 2 No |
Answer / mina
Compiler Error.
switch operates only with char and int.
| Is This Answer Correct ? | 3 Yes | 0 No |
Under linux environment can u please provide a c code for computing sum of series 1-2+3-4+5......n terms and -1+2-3+4-5...n terms..
Predict the Output: int main() { int *p=(int *)2000; scanf("%d",2000); printf("%d",*p); return 0; } if input is 20 ,what will be print
To reverse an entire text file into another text file.... get d file names in cmd line
#define SQR(x) x * x main() { printf("%d", 225/SQR(15)); } a. 1 b. 225 c. 15 d. none of the above
#define f(g,g2) g##g2 main() { int var12=100; printf("%d",f(var,12)); }
Find your day from your DOB?
15 Answers Accenture, Microsoft,
how to print 1 2 3 4 5 6 7 8 9 10 9 8 7 6 5 4 3 2 1 using any loop(for or while) only once(only 1 loop) and maximum 2 variables using C.
19 Answers Cap Gemini, Infosys,
main() { int x=5; for(;x!=0;x--) { printf("x=%d\n", x--); } } a. 5, 4, 3, 2,1 b. 4, 3, 2, 1, 0 c. 5, 3, 1 d. none of the above
Write a function to find the depth of a binary tree.
13 Answers Adobe, Amazon, EFI, Imagination Technologies,
why java is platform independent?
#define DIM( array, type) sizeof(array)/sizeof(type) main() { int arr[10]; printf(“The dimension of the array is %d”, DIM(arr, int)); }
posted by surbhi just now main() { float a = 5.375; char *p; int i; p=(char*)&a; for(i=0;i<=3;i++) printf("%02x",(unsigned char) p[i]); } how is the output of this program is :: 0000ac40 please let me know y this output has come