NEW AND EXCLUSIVE : GO TO THE ONLINE TEST PAGE AND TEST YOURSELF THROUGH EXAMINATION

What will be the Output Of the Following C-codes?

Q.1
Which of the following statements are correct about an array?

a:The array int num[26]; can store 26 elements.
b:The expression num[1] designates the very first element in the array.
c:It is necessary to initialize the array at the time of declaration.
d:The declaration num[SIZE] is allowed if SIZE is a macro.


Q.2
If char=1, int=4, and float=4 bytes size, What will be the output of the program ?

#include<stdio.h>


int main()
{
char ch = 'A';
printf("%d, %d, %d", sizeof(ch), sizeof('A'), sizeof(3.14f));
return 0;
}

Q.3
What will be the output of the program ?

#include<stdio.h>

int main()
{
char str[] = "Nagpur";
str[0]='K';
printf("%s, ", str);
str = "Kanpur";
printf("%s", str+1);
return 0;
}

Let me learn what you think :)