ExamTray App is now Available on Google Play EXAMTRAY android app link

 

00:00:00

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

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

1) What is the limit for number of functions in a C Program.?
2) Every C Program should contain which function.?
3) What is the minimum number of functions to be present in a C Program.?
4) What is the output of C Program with functions.?
static void show();

int main()
{
    printf("ROCKET ");
    show();
    return 0;
}

static void show()
{
    printf("STATIC");
}
5) What is the maximum number of statements that can present in a C function.?
6) What characters are allowed in a C function name identifier.?
7) What is the output of C Program with functions and pointers.?
int main()
{
    int b=25;
    //b memory location=1234;
    int *p = b;
    printf("%d %d", b, p);

    return 0;
}
8) What is the output of C Program with functions and pointers.?
int main()
{
    int b=25;
    //b memory location=1234;
    int *p;
    p=&b;
    printf("%d %d %d", &b, p);
    return 0;
}
9) What do you call STAR * and Ampersand & in a c program context.?
int a=10, *p;
p = &a;
printf("%d %d", a, *p);
10) What is the output of C Program with functions.?
#include 
int sum(int,int);
int main()
{
    int a=5, b=10, mysum;
    mysum = sum(a,b);
    printf("SUM=%d ", mysum);
    printf("SUM=%d", sum(10,20));
    return 0;
}
int sum(int i, int j)
{
    return (i+j);
}
11) Arguments passed to a function in C language are called ___ arguments.
12) Arguments received by a function in C language are called ___ arguments.
13) Choose a corrects statement about C language function arguments.
14) What is the output of C program with functions.?
int main()
{
    printf("funny=%d" , funny());
    return 0;
}
funny()
{
   
}
15) What is the output of C Program with functions.?
void funny2();
int main()
{
    printf("funny2=%d" , funny2());
    return 0;
}
void funny2()
{

}
16) Choose a correct statement with C Functions.
17) Choose a non Library C function below.
18) What is the default return value of a C function if not specified explicitly.?
19) What do you call this C Function calling itself.?
int funny2()
{
    funny2(num);
}
20) What is the output of C Program with functions.?
int bunny(int,int);
int main()
{
    int a, b;
    a = bunny(5, 10);
    b = bunny(10, 5);
    printf("%d %d", a, b);
    return 0;
}
int bunny(int i, int j)
{
    return (i, j);
}