C Programming What will be the output of the given program?#includevoid main(){ int i=10; printf("i=%d", i); { int i=20; printf("i=%d", i); i++; printf("i=%d", i); } printf("i=%d", i);} 10 20 21 10 10 10 11 11 10 20 21 20 10 20 21 21 10 20 21 10 10 10 11 11 10 20 21 20 10 20 21 21 ANSWER DOWNLOAD EXAMIANS APP
C Programming What will be the output of given program?#includevoid main(){int a=3;for(;a;printf("%d ", a--);} no output infinity loop 3 2 1 3 2 1 0 no output infinity loop 3 2 1 3 2 1 0 ANSWER DOWNLOAD EXAMIANS APP
C Programming What is the output of the following program?#includeint c[10] = {1,2,3,4,5,6,7,8,9,10}; main(){ int a, b=0; for(a=0;a<10;++a) if(c[a]%2 == 1) b+=c[a]; printf("%d", b);} 25 30 20 24 None of these 25 30 20 24 None of these ANSWER DOWNLOAD EXAMIANS APP
C Programming char *ptr;char myString[] = "abcdefg";ptr = myString;ptr += 5;what string does ptr point to in the sample code above? defg bcdefg cdefg fg efg defg bcdefg cdefg fg efg ANSWER DOWNLOAD EXAMIANS APP
C Programming Determine output:#include void main(){ char *p = NULL; char *q = 0; if(p) printf(" p "); else printf("nullp"); if(q) printf("q"); else printf(" nullq");} Depends on the compiler p q x nullq where x can be p or nullp depending on the value of NULL nullp nullq Depends on the compiler p q x nullq where x can be p or nullp depending on the value of NULL nullp nullq ANSWER DOWNLOAD EXAMIANS APP
C Programming Which of the following statements are correct about the program below?#includevoid main(){ int size, i; scanf("%d", &size); int arr[size]; for(i=1; i<=size; i++) { scanf("%d", arr[i]); printf("%d", arr[i]); }} The code is erroneous since the values of array are getting scanned through the loop. The code is erroneous since the statement declaring array is invalid. The code is correct and runs successfully. None of these The code is erroneous since the subscript for array used in for loop is in the range 1 to size. The code is erroneous since the values of array are getting scanned through the loop. The code is erroneous since the statement declaring array is invalid. The code is correct and runs successfully. None of these The code is erroneous since the subscript for array used in for loop is in the range 1 to size. ANSWER DOWNLOAD EXAMIANS APP