C Programming What number would be shown on the screen after the following statements of C are executed?char ch; int i; ch = 'G'; i = ch-'A';printf("%d", i); 9 6 5 8 7 9 6 5 8 7 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 III and IV II and III I and II I, II and III I, III and IV III and IV II and III I and II I, II and III I, III and IV ANSWER DOWNLOAD EXAMIANS APP
C Programming Consider the following type definition.typedef char x[10];x myArray[5];What will sizeof(myArray) be ? (Assume one character occupies 1 byte) None of these 10 30 15 50 None of these 10 30 15 50 ANSWER DOWNLOAD EXAMIANS APP
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 1 -5 30 10 15 1 -5 30 10 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? 7 12 6 It will not compile because not enough initializers are given 24 7 12 6 It will not compile because not enough initializers are given 24 ANSWER DOWNLOAD EXAMIANS APP
C Programming What's wrong in the following statement, provided k is a variable of type int?for(k = 2, k <=12, k++) There should be a semicolon at the end of the statement. The increment should always be ++k . The variable k can’t be initialized. The commas should be semicolons. The variable must always be the letter i when using a for loop. There should be a semicolon at the end of the statement. The increment should always be ++k . The variable k can’t be initialized. The commas should be semicolons. The variable must always be the letter i when using a for loop. ANSWER DOWNLOAD EXAMIANS APP