Choose the best answer.Prior to using a pointer variable It should be initialized. It should be both declared and initialized. None of these. It should be declared. TRUE ANSWER : ? YOUR ANSWER : ?
Consider the following code:void main(){ int a[5] = {6,8,3,9,0}, i=0; if(i != 0) { break; printf("%d", a[i]); } else printf("%d", a[i++]);}What is the output of the above program? 6 Runtime error Syntax error No output 8 TRUE ANSWER : ? YOUR ANSWER : ?
C was primarily developed as System programming language Data processing language General purpose language None of these TRUE ANSWER : ? YOUR ANSWER : ?
Determine Output:void main(){ int i=0, j=0; if(i && j++) printf("%d..%d", i++, j); printf("%d..%d", i, j);} 1..0 1..1 0..1 0..0 TRUE ANSWER : ? YOUR ANSWER : ?
Let x be an array. Which of the following operations are illegal?I. ++xII. x+1III. x++IV. x*2 I, III and IV II and III I, II and III I and II III and IV TRUE ANSWER : ? YOUR ANSWER : ?
Which of the following correctly accesses the seventh element stored in arr, an array with 100 elements? arr[6] arr[7] arr{6} None of these arr{7} TRUE ANSWER : ? YOUR ANSWER : ?
What would be the output for the following Turbo C code?#include<stdio.h>void main(){ int a[]={ 1, 2, 3, 4, 5 }, *p; p=a; ++*p; printf("%d ", *p); p += 2; printf("%d", *p);} 3 3 2 4 2 2 2 3 3 4 TRUE ANSWER : ? YOUR ANSWER : ?
"My salary was increased by 15%" Select the statement, which will EXACTLY reproduce the line of text above. printf("My salary was increased by 15'%'!"); printf("My salary was increased by 15%!"); printf("My salary was increased by 15/%!"); printf("My salary was increased by 15%%!"); TRUE ANSWER : ? YOUR ANSWER : ?
Comment on the following?const int *ptr; We cannot change the pointer ptr itself. We cannot change the value pointed by ptr. We can change the pointer as well as the value pointed by it. Both of the above TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following program?void main(){ int a, b, c, d; a = 3; b = 5; c = a, b; d = (a, b); printf("c=%d d=%d", c, d);} c=3 d=3 c=5 d=3 c=3 d=5 c=5 d=5 TRUE ANSWER : ? YOUR ANSWER : ?