What is right way to Initialize array? int n(6) = { 2, 4, 12, 5, 45, 5 }; int n{} = { 2, 4, 12, 5, 45, 5 }; int n{6} = { 2, 4, 12 }; int num[6] = { 2, 4, 12, 5, 45, 5 }; TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of given program?#include<stdio.h>void main(){int a=3;for(;a;printf("%d ", a--);} no output 3 2 1 3 2 1 0 infinity loop TRUE ANSWER : ? YOUR ANSWER : ?
A preprocessor command has # as the first character comes before the first executable statement need not start on a new line need not start on the first column TRUE ANSWER : ? YOUR ANSWER : ?
Choose the correct statement.I. The scope of a macro definition need not be the entire program.II. The scope of a macro definition extends from the point of definition to the end of the file.III. New line is a macro definition delimiter.IV. A macro definition may go beyond a line. II, III and IV I, II and III I, II, III and IV II and III I and II TRUE ANSWER : ? YOUR ANSWER : ?
Any C program Need not contain any function. Must contain at least one function. None of these Needs input data. TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the program ?#include#includevoid main(){ char str[] = "Exam\0Veda"; printf("%s", str);} Veda Exam Veda Exam Exam\0Veda None of these TRUE ANSWER : ? YOUR ANSWER : ?
Determine Output:void main(){ char a[]="12345"; int i = strlen(a); printf("%d", ++i);} 5 6 None of These 7 TRUE ANSWER : ? YOUR ANSWER : ?
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{7} arr[6] TRUE ANSWER : ? YOUR ANSWER : ?
Comment on the following pointer declaration?int *ptr, p; ptr and p, both are pointers to integer. ptr and p both are not pointers to integer. ptr is pointer to integer, p may or may not be. ptr is a pointer to integer, p is not. TRUE ANSWER : ? YOUR ANSWER : ?
Determine Output:void main(){ int i=1; while(i<=5) { printf("%d", i); if(i>2) goto here; i++; }}fun(){ here: printf("PP");} None of These Compiler Error 12PP345 12PP TRUE ANSWER : ? YOUR ANSWER : ?