C Programming - Control Instructions - Discussion
Discussion Forum : Control Instructions - Point Out Correct Statements (Q.No. 6)
6.
Which of the following statements are correct about the below C-program?
#include<stdio.h>
int main()
{
int x = 10, y = 100%90, i;
for(i=1; i<10; i++)
if(x != y);
printf("x = %d y = %d\n", x, y);
return 0;
}
1 : | The printf() function is called 10 times. |
2 : | The program will produce the output x = 10 y = 10 |
3 : | The ; after the if(x!=y) will NOT produce an error. |
4 : | The program will not produce output. |
Discussion:
70 comments Page 7 of 7.
Saikumar said:
9 years ago
Thank you, @Prasanth.
(1)
Antor said:
8 years ago
Explain it, please.
(1)
Manish said:
1 decade ago
Excellent Kavya. !
Nitika said:
1 decade ago
Hmmm. Right kavya.
Dayal said:
1 decade ago
Very good kavya.
DAJ said:
1 decade ago
Very good kavya.
Santosh SN said:
1 decade ago
Thank you kavya.
Bhushan said:
1 decade ago
Thanks kavya. !
Dana said:
1 decade ago
2,3 comes how?
Vivek kumar said:
7 years ago
Thanks @Kavya.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers