main()
{
int i = 3;
for (;i++=0;) printf(“%d”,i);
}
Answer / susie
Answer :
Compiler Error: Lvalue required.
Explanation:
As we know that increment operators return rvalues and
hence it cannot appear on the left hand side of an
assignment operation.
Is This Answer Correct ? | 14 Yes | 1 No |
How will you print % character? a. printf(“\%”) b. printf(“\\%”) c. printf(“%%”) d. printf(“\%%”)
#include"math.h" void main() { printf("Hi everybody"); } if <stdio.h> will be included then this program will must compile, but as we know that when we include a header file in "" then any system defined function find its defination from all the directrives. So is this code of segment will compile? If no then why?
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
#define FALSE -1 #define TRUE 1 #define NULL 0 main() { if(NULL) puts("NULL"); else if(FALSE) puts("TRUE"); else puts("FALSE"); }
#include<stdio.h> int main() { int a=3,post,pre; post= a++ * a++ * a++; a=3; pre= ++a * ++a * ++a; printf("post=%d pre=%d",post,pre); return 0; }
write a program to count the number the same (letter/character foreg: 's') in a given sentence.
Sir... please give some important coding questions asked by product companies..
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.
Finding a number which was log of base 2
#define f(g,g2) g##g2 main() { int var12=100; printf("%d",f(var,12)); }
What is the output for the program given below typedef enum errorType{warning, error, exception,}error; main() { error g1; g1=1; printf("%d",g1); }
Is this code legal? int *ptr; ptr = (int *) 0x400;