edited by
485 views
2 votes
2 votes

Which of the following statements is/are true ?

#include <stdio.h>
int main()
{
int x=10, y=200%90, i;
for( i=1;i++<=10;);
if(x==y);
printf("x=%dy=%d\n",x,y );
return 0;
} 
  1. printf() is called infinite times
  2. program will produce output x=10,y=20;
  3. The program will not produce any output
  4. The program will produce some error
edited by

1 Answer

Answer:

Related questions

0 votes
0 votes
0 answers
1
Bikram asked May 14, 2017
362 views
Which among following statements is/are TRUE?& is bit-wise and && is a logical operator& returns an integer value whereas && returns a boolean valueBoth the above options...
3 votes
3 votes
1 answer
2
Bikram asked May 14, 2017
392 views
Assume that $a[4]$ is a one-dimensional array of $4$ elements, $p$ is a pointer variable and $p = a$ is performed. Now, which among these expressions is illegal?$p == a[0...
0 votes
0 votes
1 answer
3
Bikram asked May 14, 2017
351 views
Spot the error(s) in this code snippet :int n=2; // Line 1 switch(n) { case 1.5: printf( "gate"); break; case 2: printf( "overflow"); break; case 'A': printf("gateoverflo...
0 votes
0 votes
1 answer
4
Bikram asked May 14, 2017
199 views
#include<stdio.h int K = 10; int main() { foo(); foo(); return 0; } int foo() { static int k= 1; printf("%d ",k); k++; return 0; }What is the output of the above code sni...