Online Tests for Programming and protocol solving in C language

Programming and protocol solving in C language

Download Guruji24.com App on Google Play
  • 1. Each question below gives a multiple choice of answers. Choose the most appropriate one and enter in the "OMR" answer sheet supplied with the question paper, following instructions therein.


    Q - 1.1 . What will be the output of the following code segment? Main() {char s[10]; strcpy(s,"abc"); printf("%d, %d", strlen(s), sizeof(s))}

    Q - 1.2 . what is the following function doing main() {char line[80]; gets(lines); puts(line);}

    Q - 1.3 . Which of the following is not one of the processes that a high level language program must go through before it is ready to be executed?

    Q - 1.4 . The part of a machine level instruction, which tells the central processor what has to be done, is

    Q - 1.5 . What would be the value of c? {int c; float a,b; a=245.05; b=40.02; c=a+b;}

    Q - 1.6 . How many times will the following loop be executed? Ch='b' while(ch>='a' && ch<='z')

    Q - 1.7 . A program that coverts a high level language program to set of instructions that can run on a computer is called a

    Q - 1.8 . Why are pointers sometimes found to be difficult to understand?

    Q - 1.9 . Which of the following statement is true after execution of program. Int a[10],I,*p; a[0]=1; a[1]=2; p=a; (*p)++

    Q - 1.10 . A natural number 1 is also a

    2. Each statement below is either TRUE or FALSE. Choose the most appropriate one and ENTER in the "OMR" answer sheet supplied with the question paper, following instructions therein.


    Q - 2.1 . A static variable cannot be initialized.

    Q - 2.2 . feof() is a library function.

    Q - 2.3 . A word processor can be used to create or view a text file but not a binary file.

    Q - 2.4 . A loop may contain another loop in its body.

    Q - 2.5 . The 'C' language does not support call-by reference.

    Q - 2.6 . Unless otherwise defined, a variable declared in a function is considered to be auto.

    Q - 2.7 . To return from a function you must use the keyword return.

    Q - 2.8 . If an array had been defined like this: int array[12]; the word array representes the address of the array.

    Q - 2.9 . The C compiler generates an error if the subscript used for an array exceeds the size of the array.

    Q - 2.10 . There is no difference between the functions malloc() and calloc() both are used to allocate memory.

    3. Match words and phrases in column X with the closest related meaning/ word(s)/phrase(s) in column Y. Enter your selection in the "OMR" answer sheet supplied with the question paper, following instructions therein

    Question Select Answer
    3.1 Function definition
    3.2 Stack of plates
    3.3 Preprocessor directive
    3.4 &
    3.5 Premature loop termination
    3.6 Dynamic memory allocation
    3.7 Multiple initializations in a for loop
    3.8 rand()
    3.9 Alogorithm
    3.10 Multiplication

    4. Each statement below has a blank space to fit one of the word(s) or phrase(s) in the list below. Enter your choice in the "OMR" answer sheet supplied with the question paper, following instructions therein.

    Question Select Answer
    4.1 The size of is a(n) _________ .
    4.2 The function sprintf() is meant for formatted write to a memory _________ .
    4.3 If a function calls another function, the recursion is said to be _______.
    4.4 There are _________ keywords in "C" language.
    4.5 All the variables defined in a program including pointer to an object of the same _______.
    4.6 A function gets called when the function name is followed by a _______.
    4.7 An _______ consists of one or more constants, variables, function calls or operations.
    4.8 int _________ (FILE*fp) returns non-zero error occurred on the stream.
    4.9 The operator _________ is used exclusively with pointer.
    4.10 The following expression in 'C' language 1+2*3-5 evaluates to the value _______.