C Programming Questions and Answers:: Functions

@ : Home > C Programming Questions and Answers > Functions > General Questions

How many times the program will print "ExamBeat" ?


#include

int main()
{
    printf("ExamBeat");
    main();
    return 0;
}
A. Infinite times
B. 32767 times
C 65535 times
D. Till stack overflows

What is the notation for following functions?


1.  int f(int a, float b)
    {
        /* Some code */
    }

2.  int f(a, b)
    int a; float b;
    {
        /* Some code */
    }
A. 1. KR Notation 2. ANSI Notation
B. 1. Pre ANSI C Notation 2. KR Notation
C 1. ANSI Notation 2. KR Notation
D. 1. ANSI Notation 2. Pre ANSI Notation

How many times the program will print "IndiaBIX" ? #include int main() { printf("IndiaBIX"); main(); return 0; }

A. Infinite times
B. 32767 times
C 65535 times
D. Till stack overflows

What is the notation for following functions? 1. int f(int a, float b) { /* Some code */ } 2. int f(a, b) int a; float b; { /* Some code */ }

A. 1. KR Notation 2. ANSI Notation
B. 1. Pre ANSI C Notation 2. KR Notation
C 1. ANSI Notation
D. 1. ANSI Notation 2. Pre ANSI Notation

The keyword used to transfer control from a function back to the calling function is

A. switch
B. goto
C go back
D. return