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 ? | 15 Yes | 2 No |
Answer / mina
Compiler Error.
switch operates only with char and int.
Is This Answer Correct ? | 3 Yes | 0 No |
Is the following code legal? struct a { int x; struct a *b; }
main() { float me = 1.1; double you = 1.1; if(me==you) printf("I love U"); else printf("I hate U"); }
how to delete an element in an array
write a c-program to find gcd using recursive functions
/*what is the output for*/ void main() { int r; printf("Naveen"); r=printf(); getch(); }
main() { float i=1.5; switch(i) { case 1: printf("1"); case 2: printf("2"); default : printf("0"); } }
main() { int c=- -2; printf("c=%d",c); }
Write a program to implement the motion of a bouncing ball using a downward gravitational force and a ground-plane friction force. Initially the ball is to be projected in to space with a given velocity vector
main() { while (strcmp(“some”,”some\0”)) printf(“Strings are not equal\n”); }
¦void main() ¦{ ¦int i=10,j; ¦ j=i+++i+++i; ¦printf("%d",j); ¦getch(); ¦} ¦ output:-30 but in same question if we write as- ¦void main() ¦{ ¦int i=10; ¦ int j=i+++i+++i; ¦printf("%d",j); ¦getch(); ¦} ¦ output:-33 why output is changed from 30 to 33. Can any body answer...
1 o 1 1 0 1 0 1 0 1 1 0 1 0 1 how to design this function format in c-language ?
main() { int a=10,*j; void *k; j=k=&a; j++; k++; printf("\n %u %u ",j,k); }