C Programming What is the result of compiling and running this code?main(){ char string[] = "Hello World"; display(string);}void display(char *string){ printf("%s", string);} Compilation Error None of these. will print Hello World will print garbage value Compilation Error None of these. will print Hello World will print garbage value ANSWER DOWNLOAD EXAMIANS APP
C Programming 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? 12 7 It will not compile because not enough initializers are given 6 24 12 7 It will not compile because not enough initializers are given 6 24 ANSWER DOWNLOAD EXAMIANS APP
C Programming Determine Output:void main(){ int i=-1, j=-1, k=0, l=2, m; m = i++ && j++ && k++ || l++; printf("%d %d %d %d %d", i, j, k, l, m);} 0 0 1 3 1 0 0 1 3 0 0 0 0 2 1 0 0 1 2 0 0 0 1 3 1 0 0 1 3 0 0 0 0 2 1 0 0 1 2 0 ANSWER DOWNLOAD EXAMIANS APP
C Programming Let x be an array. Which of the following operations are illegal?I. ++xII. x+1III. x++IV. x*2 I and II I, II and III I, III and IV II and III III and IV I and II I, II and III I, III and IV II and III III and IV ANSWER DOWNLOAD EXAMIANS APP
C Programming What will be printed when this program is executed?int f(int x){ if(x <= 4) return x; return f(--x);}void main(){ printf("%d ", f(7)); } 1 2 3 4 Syntax error Runtime error 4 4 5 6 7 1 2 3 4 Syntax error Runtime error 4 4 5 6 7 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 statement declaring array is invalid. The code is erroneous since the values of array are getting scanned through the loop. None of these The code is correct and runs successfully. 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 statement declaring array is invalid. The code is erroneous since the values of array are getting scanned through the loop. None of these The code is correct and runs successfully. The code is erroneous since the subscript for array used in for loop is in the range 1 to size. ANSWER DOWNLOAD EXAMIANS APP