Signup/Sign In

Arrays in C Language

This Test will cover Arrays in C Langauge, including one dimensional array, two dimensional array and character array.
Q. What will be the output of the program if the array begins at 1200 in memory?
main()
{
    int arr[] = {2, 3, 4, 1, 6};
    printf("%u, %u, %u\n", arr, &arr[0], &arr);
    return 0;
}
Q. Which of the following function is appropriate for reading in a multi-word string?
Q. Which of the following is not a valid declaration of arrays?

Q. What will be the output of given code
main()
{
    char ch[20];
    ch = "Study Tonight";
    printf("%s", ch);
}
Q. What will be the output of given code?
main()
{
    int arr[3] = {1, 2};
    printf("%d", &arr[2]);
}
Q. What will be the output of given code?
main()
{
    char str[7] = "strings";
    printf("%s", str);
}
Q Which of the following function is used to show reverse of string?

Q. Which of the following represent null character in C language?
Q. Which library file contain all the string handling functions?
Q. What will be the output of given code?
#include<stdio.h>
#include<string.h>
main()
{
    int i;
    i = strcmp("study", "tonight");
    printf("%d",i);
}

Related Tests: