Q.1
Consider the following type definition.
typedef char x[10];
x myArray[5];
What will sizeof(myArray) be ? (Assume one character occupies 1 byte)
Q.2
What will be the correct output of the following program?
#include<string.h>
void main()
{
   char str[] = "C EXAMINATION", rev[17];
   int i = strlen(str), j=0;
   for( ; i>=0; rev[j++] = str[i--])
   rev[j] =  str[j] ;
   puts(rev);
}
Q.3
The function sprintf() works like printf(), but operates on ..........
Q.4
String concatenation means -
Q.5
What will be the output of the program ?
#include<stdio.h>
void main()
{
    printf(5+"Good Morningn");
}
Q.6
What will be the output of the program ?
#include
#include
void main()
{
    char str[] = "Exam\0Veda";
    printf("%s", str);
}
Q.7
Which of the following correctly accesses the seventh element stored in arr, an array with 100 elements?
Q.8
What is the return value of the following statement if it is placed in C program? strcmp("ABC", "ABC");
Q.9
int a[5] = {1,2,3}
What is the value of a[4]?
Q.10
If the two strings are identical, then strcmp() function returns
Q.11
The library function used to find the last occurrence of a character in a string is
Q.12
Which of the following function is used to find the first occurrence of a given string in another string?
Q.13
Which of the following function is more appropriate for reading in a multi-word string?
Q.14
What will be printed after execution of the following code?
void main()
{
      int arr[10] = {1,2,3,4,5};
      printf("%d", arr[5]);
}
Q.15
What will be the output of the program ?
#include<stdio.h>
#include<string.h>
void main()
{
    char str1[20] = "Hello", str2[20] = " World";
    printf("%s", strcpy(str2, strcat(str1, str2)));
}
Q.16
What will be the output of the following code?
void main()
{
      int a[10];
      printf("%d %d", a[-1], a[12]);
}
Q.17
What does the following declaration mean?
int (*ptr)[10];
Q.18
Array passed as an argument to a function is interpreted as
Q.19
What will be the output of the program if the array begins at 65472 and each integer occupies 2 bytes?
#include
void main()
{
    int a[3][4] = {1, 2, 3, 4, 4, 3, 2, 1, 7, 8, 9, 0};
    printf("%u, %u", a+1, &a+1);
}
Q.20
What is the maximum number of dimensions an array in C may have?
0 h : 0 m : 1 s