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 10 30 -5 1 15 10 30 -5 1 15 ANSWER DOWNLOAD EXAMIANS APP
C Programming Determine Output:void main(){ int i=0, j=0; if(i && j++) printf("%d..%d", i++, j); printf("%d..%d", i, j);} 0..0 1..0 1..1 0..1 0..0 1..0 1..1 0..1 ANSWER DOWNLOAD EXAMIANS APP
C Programming What will be the output of the program ?#includeint main(){ int arr[1] = {10}; printf("%d", 0[arr]); return 0;} 0 None of these 10 1 6 0 None of these 10 1 6 ANSWER DOWNLOAD EXAMIANS APP
C Programming Consider the following type definition.typedef char x[10];x myArray[5];What will sizeof(myArray) be ? (Assume one character occupies 1 byte) 50 10 None of these 15 30 50 10 None of these 15 30 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);} 10 Undefined behavior Compiler time error Segmentation fault/runtime crash 10 Undefined behavior Compiler time error Segmentation fault/runtime crash ANSWER DOWNLOAD EXAMIANS APP
C Programming Determine Output:void main(){ int a[] = {10,20,30,40,50}, j, *p; for(j=0; j<5; j++){ printf("%d" ,*a); a++; } p = a; for(j=0; j<5; j++){ printf("%d" ,*p); p++; }} 10 20 30 40 50 10 20 30 40 50 None of These Error 10 20 30 40 50 Garbage Value 10 20 30 40 50 10 20 30 40 50 None of These Error 10 20 30 40 50 Garbage Value ANSWER DOWNLOAD EXAMIANS APP