Consider the following program fragment:for(c=1, sum=0; c <= 10; c++){ scanf("%d", &x); if( x < 0 ) continue; sum += x;}What would be the value of sum for the input 1, -1, 2, -2, 3, -3, 4, -4, 5, -5 30 10 15 -5 1 TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following program? #include\<stdio.h> int main(){ extern int i; i = 20; printf("%ld ", sizeof(i)); return 0; } Depends on the Compiler Linker Error : Undefined symbol 'i' 2 4 TRUE ANSWER : ? YOUR ANSWER : ?
Determine Output:void main(){ int i=0; for(;i++;printf("%d", i)); printf("%d", i);} Error 11 1 12 TRUE ANSWER : ? YOUR ANSWER : ?
Find the output of the following program.#includevoid main(){ int y=10; if(y++>9 && y++!=10 && y++>11) printf("%d", y); else printf("%d", y);} Compilation error 14 12 11 13 TRUE ANSWER : ? YOUR ANSWER : ?
The default parameter passing mechanism is None of these. call by value call by reference call by value result TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of this program on an implementation where int occupies 2 bytes?#include <stdio.h>void main(){ int i = 3; int j; j = sizeof(++i + ++i); printf("i=%d j=%d", i, j);} the behavior is undefined i=3 j=2 i=5 j=2 i=4 j=2 TRUE ANSWER : ? YOUR ANSWER : ?
void main(){ int a=10, b; b = a++ + ++a; printf("%d %d %d %d", b, a++, a, ++a);}what will be the output when following code is executed? 22 13 14 14 22 12 12 13 12 10 11 13 22 11 11 11 22 14 12 13 TRUE ANSWER : ? YOUR ANSWER : ?
Determine Output:void main(){ static int var = 5; printf("%d ", var--); if(var) main();} Infinite Loop None of These 5 4 3 2 1 5 5 5 5 5 TRUE ANSWER : ? YOUR ANSWER : ?
In which stage the following code#include<stdio.h>gets replaced by the contents of the file stdio.h During Preprocessing During Editing During Execution During linking None of these TRUE ANSWER : ? YOUR ANSWER : ?
What is the output of given program if user enter value 99?#include<stdio.h>void 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"); }} Enter a number:99 Number is divisible by 5 Enter a number:99 Run time error complier error TRUE ANSWER : ? YOUR ANSWER : ?