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

C Programming Basics Tutorial - Functions and Pointers - Online Test 3

Instructions

Total Questions: 20

Total Minutes: 20

This ExamTray Free Online Exam tests your C Programming Skills on C Functions, Recursion, Pointers, Pass by Value, Pass by Reference Syntax. Examples are given as questions and answers. Easily Attend Competitive Exams and Job Interview Questions.

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

All the Best

Challenge SCORE

0 / 20

Take This Exam
1) What are the data type of variables that can be returned by a C Function.?
2) What is the output of a C Program with functions and pointers.?
void texas(int *,int *);
int main()
{
    int a=11, b=22;
    printf("Before=%d %d, ", a, b);
    texas(&a, &b);
    printf("After=%d %d", a, b);
    
    return 0;
}
void texas(int *i, int *j)
{
    *i = 55;
    *j = 65;
}
3) What is the output of C Program with functions.?
int main()
{
    int a = 66;
    printf("%d %d %d,\n", a, ++a, a++);
    a = 66;
    printf("%d %d %d,\n", ++a, a++, a);
    a = 66;
    printf("%d %d %d", ++a, a, a++);
    return 0;
}
4) What is the output of a C program.?
int main()
{
    int a = 1;
    printf("%d %d %d,\n", a, ++a, a++);
    a = 1;
    printf("%d %d %d,\n", ++a, a++, a);
    a = 1;
    printf("%d %d %d", ++a, a, a++);
    return 0;
}
5) What is the output of a C Program.?
void show(int,int,int);
int main()
{
    int a = 1;
    show(++a, a++, a);
    return 0;
}
void show(int i, int j, int k)
{
    printf("%d %d %d,\n", i, j, k);
}
6) What is the output of C Program with pointers.?
int main()
{
    int a = 4;
    int *p;
    p=&a;
    while(*p > 0)
    {
        printf("%d ", *p);
        (*p)--;
    }
    return 0;
}
7) What is the output of C Program with functions.?
void show();
int show();
int main()
{
    printf("ANT\n");
    return 0;
}
void show()
{
     printf("Integer") ;
}
int show()
{
    printf("Void");
}
8) What is the output of C Program with functions.?
void show(int);
void show(float);
int main()
{
    printf("ANT\n");
    return 0;
}
void show(int a)
{
     printf("Integer") ;
}
void show(float b)
{
    printf("Void");
}
9) What is the output of C Program with pointers.?
int main()
{
    int a=10;
    int *p, **q;
    p=&a;
    q=&p;
    printf("%d ", a);
    *p=15;
    printf("%d ", a);
    **q=20;
    printf("%d ", a);
    return 0;
}
10) What is the output of C Program with pointers.?
int main()
{
    int a=20;
    int *p, *q;
    p=&a;
    q=p;
    printf("%d ", a);
    *p=30;
    printf("%d ", a);
    *q=40;
    printf("%d ", a);
    return 0;
}
11) What is the output of C Program with pointers.?
int main()
{
    int a=20;
    //a memory location=1234
    printf("%d %d %d", a, &a, *(&a));
    return 0;
}
12) What is the output of C Program with functions.?
int main()
{
    int a=20;
    printf("CINEMA ");
    return 1;
    printf("DINOSAUR");
    return 1;
}
13) What is the output of C Program with recursive function.?
int sum(int);
int main()
{
    int b;
    b = sum(4);
    printf("%d", b);
    
}
int sum(int x)
{
    int k=1;
    if(x<=1)
     return 1;
    k = x + sum(x-1);
    return k;
}
14) What is the output of C Program with Recursive Function.?
int mul(int);
int main()
{
    int b;
    b = mul(3);
    printf("%d", b);
}
int mul(int x)
{
    if(x<=1)
     return 1;
    return (x * mul(x-1));
}
15) A recursive function can be replaced with __ in c language.
16) A recursive function is faster than __ loop.
17) A recursive function without If and Else conditions will always lead to.?
18) What is the C keyword that must be used to achieve expected result using Recursion.?
19) How many functions are required to create a recursive functionality.?
20) Choose a correct statement about Recursive Function in C language.
Certification Group ID
3858

Open Certification Helper Popup Reset Popup