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 |
main() { int i, j; scanf("%d %d"+scanf("%d %d", &i, &j)); printf("%d %d", i, j); } a. Runtime error. b. 0, 0 c. Compile error d. the first two values entered by the user
#define a 10 void foo() { #undef a #define a 50 } int main() { printf("%d..",a); foo(); printf("%d..",a); return 0; } explain the answer
Write a C program that defines a 2-dimentional integer array called A [50][50]. Then the elements of this array should randomly be initialized either to 1 or 0. The program should then print out all the elements in the diagonal (i.e. a[0][0], a[1][1],a[2][2], a[3][3], ……..a[49][49]). Finally, print out how many zeros and ones in the diagonal.
How we print the table of 2 using for loop in c programing?
#include<stdio.h> main() { register i=5; char j[]= "hello"; printf("%s %d",j,i); }
main() { float me = 1.1; double you = 1.1; if(me==you) printf("I love U"); else printf("I hate U"); }
write a program for area of circumference of shapes
write a simple calculator c program to perform addition, subtraction, mul and div.
0 Answers United Healthcare, Virtusa,
main() { show(); } void show() { printf("I'm the greatest"); }
how many processes will gate created execution of -------- fork(); fork(); fork(); -------- Please Explain... Thanks in advance..!
main() { int c = 5; printf("%d", main||c); } a. 1 b. 5 c. 0 d. none of the above
main() { int i=5,j=10; i=i&=j&&10; printf("%d %d",i,j); }