C Programming Consider the following program fragment, and choose the correct onevoid main(){ int a, b = 2, c; a = 2 * (b++); c = 2 * (++b);} b = 4, c = 6 b = 3, c = 6 a = 4, c = 8 a = 4, c = 6 a = 3, c = 8 b = 4, c = 6 b = 3, c = 6 a = 4, c = 8 a = 4, c = 6 a = 3, c = 8 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++) The increment should always be ++k . The commas should be semicolons. The variable must always be the letter i when using a for loop. The variable k can’t be initialized. There should be a semicolon at the end of the statement. The increment should always be ++k . The commas should be semicolons. The variable must always be the letter i when using a for loop. The variable k can’t be initialized. There should be a semicolon at the end of the statement. ANSWER DOWNLOAD EXAMIANS APP
C Programming Which of the following correctly accesses the seventh element stored in arr, an array with 100 elements? None of these arr{6} arr{7} arr[6] arr[7] None of these arr{6} arr{7} arr[6] arr[7] ANSWER DOWNLOAD EXAMIANS APP
C Programming Determine Output:void main(){ int c[] = {2.8,3.4,4,6.7,5}; int j, *p=c, *q=c; for(j=0;j<5;j++){ printf(" %d ", *c); ++q; } for(j=0;j<5;j++){ printf(" %d ", *p); ++p; }} 2.8 2.8 2.8 2.8 2.8 2.8 3.4 4 2 2 2 2 2 2 3 4 6 5 2.8 3.4 4 6.7 5 2.8 3.4 4 6.7 2 3 4 6 5 2 3 4 6 5 2.8 2.8 2.8 2.8 2.8 2.8 3.4 4 2 2 2 2 2 2 3 4 6 5 2.8 3.4 4 6.7 5 2.8 3.4 4 6.7 2 3 4 6 5 2 3 4 6 5 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 1 30 15 10 -5 1 30 15 10 -5 ANSWER DOWNLOAD EXAMIANS APP
C Programming The statement int **a; is illegal None of these. is syntactically and semantically correct is legal but meaningless is illegal None of these. is syntactically and semantically correct is legal but meaningless ANSWER DOWNLOAD EXAMIANS APP