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 30 1 10 -5 15 30 1 10 -5 15 ANSWER DOWNLOAD EXAMIANS APP
C Programming What will be printed when this program is executed?int f(int x){ if(x <= 4) return x; return f(--x);}void main(){ printf("%d ", f(7)); } Syntax error 1 2 3 4 4 5 6 7 4 Runtime error Syntax error 1 2 3 4 4 5 6 7 4 Runtime error 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);} Compiler time error Segmentation fault/runtime crash Undefined behavior 10 Compiler time error Segmentation fault/runtime crash Undefined behavior 10 ANSWER DOWNLOAD EXAMIANS APP
C Programming 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);} Enter your age: xyz You have lived for 0 seconds Enter your age: xyz "after that program will stop" Run time error Enter your age: xyz You have lived for 0.00000 seconds Enter your age: xyz You have lived for 0 seconds Enter your age: xyz "after that program will stop" Run time error Enter your age: xyz You have lived for 0.00000 seconds ANSWER DOWNLOAD EXAMIANS APP
C Programming Determine output:void main(){ int i=10; i = !i>14; printf("i=%d", i); } 1 0 10 14 None of these 1 0 10 14 None of these ANSWER DOWNLOAD EXAMIANS APP
C Programming What will be output if you will compile and execute the following c code?#include#define max 5void main(){ int i = 0; i = max++; printf("%d", i++);} 6 5 0 Compiler Error 7 6 5 0 Compiler Error 7 ANSWER DOWNLOAD EXAMIANS APP