C Programming What's wrong in the following statement, provided k is a variable of type int?for(k = 2, k <=12, k++) The variable must always be the letter i when using a for loop. The variable k can’t be initialized. The commas should be semicolons. There should be a semicolon at the end of the statement. The increment should always be ++k . The variable must always be the letter i when using a for loop. The variable k can’t be initialized. The commas should be semicolons. There should be a semicolon at the end of the statement. The increment should always be ++k . ANSWER DOWNLOAD EXAMIANS APP
C Programming What will be the output of given program?#includevoid main(){int a=3;for(;a;printf("%d ", a--);} 3 2 1 0 no output infinity loop 3 2 1 3 2 1 0 no output infinity loop 3 2 1 ANSWER DOWNLOAD EXAMIANS APP
C Programming What is right way to Initialize array? int num[6] = { 2, 4, 12, 5, 45, 5 }; int n{} = { 2, 4, 12, 5, 45, 5 }; int n(6) = { 2, 4, 12, 5, 45, 5 }; int n{6} = { 2, 4, 12 }; int num[6] = { 2, 4, 12, 5, 45, 5 }; int n{} = { 2, 4, 12, 5, 45, 5 }; int n(6) = { 2, 4, 12, 5, 45, 5 }; int n{6} = { 2, 4, 12 }; 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");} nullp nullq p q x nullq where x can be p or nullp depending on the value of NULL Depends on the compiler nullp nullq p q x nullq where x can be p or nullp depending on the value of NULL Depends on the compiler 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 correct and runs successfully. None of these The code is erroneous since the statement declaring array is invalid. 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 correct and runs successfully. None of these The code is erroneous since the statement declaring array is invalid. 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. ANSWER DOWNLOAD EXAMIANS APP
C Programming Which of the following correctly accesses the seventh element stored in arr, an array with 100 elements? arr[6] None of these arr{7} arr{6} arr[7] arr[6] None of these arr{7} arr{6} arr[7] ANSWER DOWNLOAD EXAMIANS APP