TOTAL QS = 20Time [ 00 : 00 : 00 ]
00:00:00

C Programming Basics Tutorial - Arrays, Multidimensional Arrays and Pointers - Online Test 1

Instructions

Total Questions: 20

Total Minutes: 20

This ExamTray Free Online Exam tests your C Programming Skills on C Arrays, Multidimensional Arrays and Pointers to Arrays. Examples are given as questions and answers. Easily Attend Competitive Exams and Job Interview Questions.

Go through C Theory Notes on Arrays before attempting this test.

All the Best

Challenge SCORE

0 / 20

Take This Exam
1) What is an Array in C language.?
2) Choose a correct statement about C language arrays.
3) What are the Types of Arrays.?
4) An array Index starts with.?
5) Choose a correct statement about C language arrays.
6) What is the output of C Program.?
int main()
{
    int a[];
    a[4] = {1,2,3,4};
    printf("%d", a[0]);
}
7) What is the output of C Program.?
int main()
{
    int a[] = {1,2,3,4};
    int b[4] = {5,6,7,8};
    printf("%d,%d", a[0], b[0]);
}
8) What is the output of C Program.?
int main()
{
    char grade[] = {'A','B','C'};
    printf("GRADE=%c, ", *grade);
    printf("GRADE=%d", grade);
}
9) What is the output of C program.?
int main()
{
    char grade[] = {'A','B','C'};
    printf("GRADE=%d, ", *grade);
    printf("GRADE=%d", grade[0]);
}
10) What is the output of C program.?
int main()
{
    float marks[3] = {90.5, 92.5, 96.5};
    int a=0;
    while(a<3)
    {
        printf("%.2f,", marks[a]);
        a++;
    }
}
11) What is the output of C Program.?
int main()
{
    int a[3] = {10,12,14};
    a[1]=20;
    int i=0;
    while(i<3)
    {
        printf("%d ", a[i]);
        i++;
    }
}
12) What is the output of C program.?
int main()
{
    int a[3] = {10,12,14};
    int i=0;
    while(i<3)
    {
        printf("%d ", i[a]);
        i++;
    }
}
13) What is the output of C Program.?
int main()
{
    int a[3] = {20,30,40};
    a[0]++;
    int i=0;
    while(i<3)
    {
        printf("%d ", i[a]);
        i++;
    }
}
14) What is the output of C program with arrays.?
int main()
{
    int a[3] = {20,30,40};
    int b[3];
    b=a;
    printf("%d", b[0]);
}
15) What is the output of C Program with arrays and pointers.?
int main()
{
    int a[3] = {20,30,40};
    int (*p)[3];
    p=&a;
    printf("%d", (*p)[0]);
}
16) What is the output of C program with arrays and pointers.?
int main()
{
    int a[3] = {20,30,40};
    int *p[3];
    p=&a;
    printf("%d", *p[0]);
}
17) What is the output of C program with arrays and pointers.?
int main()
{
    int a[3] = {20,30,40};
    printf("%d", *(a+1));
}
18) What is an array Base Address in C language.?
19) What is the output of C Program with arrays and pointers.?
void change(int[]);
int main()
{
    int a[3] = {20,30,40};
    change(a);
    printf("%d %d", *a, a[0]);
}
void change(int a[])
{
    a[0] = 10;
}
20) An entire array is always passed by ___ to a called function.
Certification Group ID
3858

Open Certification Helper Popup Reset Popup