Posts

Showing posts from August, 2016

Some of the technical Questions may help you..!!

Some technical question to get through before company campus exams ..!! #include<stdio.h> main() {    char s[20] = "Hello\0Hi";       printf("%d %d", strlen(s), sizeof(s)); } A - 5 9 B - 7 20 C - 5 20 D - 8 20 --------------------------------------------------------------------------------------------------------------------------  8 - What actually get pass when you pass an array as a function argument? A - First value of elements in array B - Base address of the array --------------------------------------------------------------------------------------------------------------------------1.  What will happen if in a C program you assign a value to an array element whose subscript exceeds the size of array? A. The element will be set to 0. B. The compiler would report an error. C. The program may crash if some important data gets overwritten. D. The array size would appropriately grow. Answer: Option C Explanation: If the index of