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 |
How can u say that a given point is in a triangle? 1. with the co-ordinates of the 3 vertices specified. 2. with only the co-ordinates of the top vertex given.
main() { unsigned int i=10; while(i-->=0) printf("%u ",i); }
What is data _null_? ,Explain with code when u need to use it in data step programming ?
How we print the table of 3 using for loop in c programing?
main() { float me = 1.1; double you = 1.1; if(me==you) printf("I love U"); else printf("I hate U"); }
1) int i=5; j=i++ + i++ + i++; printf("%d",j);This code gives the answer 15.But if we replace the value of the j then anser is different?why? 2)int i=5; printf("%d",i++ + i++ + i++); this givs 18.
Given an array of characters which form a sentence of words, give an efficient algorithm to reverse the order of the words (not characters) in it.
Can you send Code for Run Length Encoding Of BMP Image in C Language in linux(i.e Compression and Decompression) ?
typedef struct error{int warning, error, exception;}error; main() { error g1; g1.error =1; printf("%d",g1.error); }
Is the following code legal? void main() { typedef struct a aType; aType someVariable; struct a { int x; aType *b; }; }
1. const char *a; 2. char* const a; 3. char const *a; -Differentiate the above declarations.
main() { char *a = "Hello "; char *b = "World"; clrscr(); printf("%s", strcpy(a,b)); } a. “Hello” b. “Hello World” c. “HelloWorld” d. None of the above
4 Answers Corporate Society, HCL,