C Programming 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 15 10 30 1 -5 15 10 30 1 -5 ANSWER DOWNLOAD EXAMIANS APP
C Programming 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);} x=5 x=1 Error x=0 x=4 x=5 x=1 Error x=0 x=4 ANSWER DOWNLOAD EXAMIANS APP
C Programming 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? Syntax error No output 6 Runtime error 8 Syntax error No output 6 Runtime error 8 ANSWER DOWNLOAD EXAMIANS APP
C Programming What will happen after compiling and running following code?main(){ printf("%p", main); } None of these. Will make an infinite loop. Error Some address will be printed. None of these. Will make an infinite loop. Error Some address will be printed. ANSWER DOWNLOAD EXAMIANS APP
C Programming Use of functions Helps to avoid repeated programming across programs. Enhances the logical clarity of the program. All of these Makes the debugging task easier. Helps to avoid repeating a set of statements many times. Helps to avoid repeated programming across programs. Enhances the logical clarity of the program. All of these Makes the debugging task easier. Helps to avoid repeating a set of statements many times. ANSWER DOWNLOAD EXAMIANS APP