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 Determine Output:void main(){ int c = - -2; printf("c=%d", c);} -2 1 Error 2 -2 1 Error 2 ANSWER DOWNLOAD EXAMIANS APP
C Programming Comment on the following pointer declaration?int *ptr, p; ptr is pointer to integer, p may or may not be. ptr and p, both are pointers to integer. ptr and p both are not pointers to integer. ptr is a pointer to integer, p is not. ptr is pointer to integer, p may or may not be. ptr and p, both are pointers to integer. ptr and p both are not pointers to integer. ptr is a pointer to integer, p is not. ANSWER DOWNLOAD EXAMIANS APP
C Programming What will be the output of the following program? #include\ int main(){ extern int i; i = 20; printf("%ld ", sizeof(i)); return 0; } Linker Error : Undefined symbol 'i' 4 Depends on the Compiler 2 Linker Error : Undefined symbol 'i' 4 Depends on the Compiler 2 ANSWER DOWNLOAD EXAMIANS APP
C Programming If the two strings are identical, then strcmp() function returns 0 -1 1 true None of these 0 -1 1 true None of these ANSWER DOWNLOAD EXAMIANS APP
C Programming Determine Output:#includevoid main(){ register i=5; char j[]= "hello"; printf("%s %d", j, i);} hello garbage value None of These hello 5 Error hello garbage value None of These hello 5 Error ANSWER DOWNLOAD EXAMIANS APP