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 30 -5 10 1 15 30 -5 10 1 ANSWER DOWNLOAD EXAMIANS APP
C Programming What does the following declaration mean?int (*ptr)[10]; ptr is an array of 10 integers ptr is a pointer to an array of 10 integers ptr is an pointer to array ptr is array of pointers to 10 integers ptr is an array of 10 integers ptr is a pointer to an array of 10 integers ptr is an pointer to array ptr is array of pointers to 10 integers ANSWER DOWNLOAD EXAMIANS APP
C Programming What will be the output of the following program?#includevoid main(){ int i = 10; void *p = &i; printf("%d\n", (int)*p);} Segmentation fault/runtime crash Undefined behavior 10 Compiler time error Segmentation fault/runtime crash Undefined behavior 10 Compiler time error ANSWER DOWNLOAD EXAMIANS APP
C Programming Choose the correct statement.I. The scope of a macro definition need not be the entire program.II. The scope of a macro definition extends from the point of definition to the end of the file.III. New line is a macro definition delimiter.IV. A macro definition may go beyond a line. I and II I, II and III II and III I, II, III and IV II, III and IV I and II I, II and III II and III I, II, III and IV II, III and IV ANSWER DOWNLOAD EXAMIANS APP
C Programming What will be the output?main() { char *p; p = "Hello"; printf("%cn",*&*p); } None of these. Some address will be printed H Hello None of these. Some address will be printed H Hello ANSWER DOWNLOAD EXAMIANS APP
C Programming The output of the following program is:#define f(g,g2) g##g2void main(){ int var12=100; printf("%d", f(var,12));} Runtime error 10012 100 g##g2 Syntax error Runtime error 10012 100 g##g2 Syntax error ANSWER DOWNLOAD EXAMIANS APP