An array elements are always stored in ________ memory locations. Sequential and Random Sequential None of these Random TRUE ANSWER : ? YOUR ANSWER : ?
The statement int **a; is illegal is legal but meaningless None of these. is syntactically and semantically correct TRUE ANSWER : ? YOUR ANSWER : ?
What will be the correct output of the following program?#include<string.h>void main(){ char str[] = "C EXAMINATION", rev[17]; int i = strlen(str), j=0; for( ; i>=0; rev[j++] = str[i--]) rev[j] = str[j] ; puts(rev);} C Syntax error NOITANIMAXE NOITANIMAXE C No output at all. TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output given program?#include<stdio.h>void main(){int i = -10;for(;i;printf("%d ", i++));} -10 to infinite Complier error -10 to -1 -10 to 0 TRUE ANSWER : ? YOUR ANSWER : ?
Which of the following statements are correct about the program below?#include<stdio.h>void 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 subscript for array used in for loop is in the range 1 to size. The code is correct and runs successfully. None of these 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. TRUE ANSWER : ? YOUR ANSWER : ?
short testarray[4][3] = { {1}, {2,3}, {4,5,6}};printf("%d", sizeof(testarray));Assuming a short is two bytes long, what will be printed by the above code? 7 It will not compile because not enough initializers are given 6 12 24 TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output?void main(){ int a=10, b=20; char x=1, y=0; if(a,b,x,y){ printf("EXAM"); } } XAM is printed exam is printed Nothing is printed Compiler Error TRUE ANSWER : ? YOUR ANSWER : ?
Which of the following correctly accesses the seventh element stored in arr, an array with 100 elements? arr{6} None of these arr[6] arr[7] arr{7} TRUE ANSWER : ? YOUR ANSWER : ?
char *ptr;char myString[] = "abcdefg";ptr = myString;ptr += 5;what string does ptr point to in the sample code above? defg fg bcdefg cdefg efg TRUE ANSWER : ? YOUR ANSWER : ?