MCQOPTIONS
Home
About Us
Contact Us
Bookmark
Saved Bookmarks
Testing Subject
General Aptitude
Logical and Verbal Reasoning
English Skills Ability
Technical Programming
Current Affairs
General Knowledge
Finance & Accounting
GATE (Mechanical Engineering)
Chemical Engineering
→
C Program
→
C Fundamentals
→
Consider the following program fragment:for(c=1, s...
1.
Consider the following program fragment:for(c=1, sum=0; c
A.
-5
B.
30
C.
10
D.
1
E.
15
Answer» F.
Show Answer
Discussion
No Comment Found
Post Comment
Related MCQs
Consider the following code:void main(){ int a[5] = {6,8,3,9,0}, i=0; if(i != 0) { break; printf("%d", a[i]); } else printf("%d", a[i++]);}What is the output of the above program?%!
What will be printed if the following code is executed?void main(){ int x=0; for( ; ; ) { if( x++ == 4 ) break; continue; } printf("x=%d", x);}%!
Consider the following program fragment:for(c=1, sum=0; c
*$_What will be the value of i and j after execution of following program?#includevoid main(){ int i, j; for(i=0,j=0;i
_ What will be the output of the given program?#includevoid main(){ int i=10; printf("i=%d", i); { int i=20; printf("i=%d", i); i++; printf("i=%d", i); } printf("i=%d", i);}$?
_What is the output of given program if user enter "xyz" ?#includevoid main(){ float age, AgeInSeconds; int value; printf("Enter your age:"); value=scanf("%f", &age); if(value==0){ printf("\\nYour age is not valid"); } AgeInSeconds = 365 * 24 * 60 * 60 * age; printf("\\n You have lived for %f seconds", AgeInSeconds);}$?
What is the output of given program if user enter "xyz" ?#includevoid main(){ float age, AgeInSeconds; printf("Enter your age:"); scanf("%f", &age); AgeInSeconds = 365 * 24 * 60 * 60 * age; printf("You have lived for %f seconds", AgeInSeconds);}?
What is the output of given program if user enter value 99?#includevoid main(){ int i; printf("Enter a number:"); scanf("%d", &i); // 99 is given as input. if(i%5 == 0){ printf("nNumber entered is divisible by 5"); }}
What will be the output of the given program?#includevoid main(){ float num=5.6; switch(num){ case 5:printf("5"); case 6:printf("6"); default : printf("0"); break; } printf("%d", num);}
What will be the output of the given program?#includevoid main(){ int value1, value2=100, num=100; if(value1=value2%5) num=5; printf("%d %d %d", num, value1, value2);}
Reply to Comment
×
Name
*
Email
*
Comment
*
Submit Reply
Your experience on this site will be improved by allowing cookies. Read
Cookie Policy
Reject
Allow cookies