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 |
program to Reverse a linked list
12 Answers Aricent, Microsoft, Ness Technologies,
programming in c lanugaue programm will errror error with two header file one as stdio.h and other one is conio.h
Give a very good method to count the number of ones in a 32 bit number. (caution: looping through testing each bit is not a solution)
void main () { int x = 10; printf ("x = %d, y = %d", x,--x++); } a. 10, 10 b. 10, 9 c. 10, 11 d. none of the above
write the function. if all the character in string B appear in string A, return true, otherwise return false.
Program to find the largest sum of contiguous integers in the array. O(n)
write a simple calculator c program to perform addition, subtraction, mul and div.
0 Answers United Healthcare, Virtusa,
write a program for area of circumference of shapes
main( ) { char *q; int j; for (j=0; j<3; j++) scanf(“%s” ,(q+j)); for (j=0; j<3; j++) printf(“%c” ,*(q+j)); for (j=0; j<3; j++) printf(“%s” ,(q+j)); }
How to access command-line arguments?
main() { while (strcmp(“some”,”some\0”)) printf(“Strings are not equal\n”); }
write a program to find out roots of quadratic equation "x=-b+-(b^2-4ac0^-1/2/2a"