1. Question: Which of the following statements will result in a compilation error?

    A
    int n=5, x; x=n++;

    B
    int n=5, x; x= ++n++;

    C
    int n=5, x; x= (n+1)++;

    D
    int n=5, x=6; x= (n+x)++;

    E
    None

    Note: Not available
    1. Report
  2. Question: Read the following two declaration statements.
    1. #include <stdio.h>
    2. #include "stdio.h"
    Which of the following statements pertaining to the above two statements are correct?

    A
    For statement 1, the header file will be searched first in the local directory and then in the standard system directories such as "/usr/include"

    B
    For statement 1, the header file will be searched in the standard system directories such as "/usr/include"

    C
    For statement 2, the header file will be searched first in the local directory and then in the standard system directories such as "/usr/include"

    D
    For statement 2, the header file will be searched first in the local directory and then in the standard system directories such as "/usr/include"

    E
    None

    Note: Not available
    1. Report
  3. Question: Which of the following statements are correct for the keyword register?

    A
    It is a storage-class-specifier

    B
    It guarantees that the variable is kept in the CPU register for maximum speed

    C
    It requests that the variable be kept in the CPU register for maximum speed

    D
    It does not guarantee that the variable value is kept in CPU register for maximum speed

    E
    None

    Note: Not available
    1. Report
  4. Question: Which is/are the type/s of memory allocation that needs/need the programmer to take care of memory management?

    A
    Static memory allocation

    B
    Dynamic memory allocation

    C
    Automatic memory allocation

    D
    Automatic memory allocation

    E
    Memory allocation on heap

    Note: Not available
    1. Report
  5. Question: Which of the following comparison statements will be true if an integer is 16 bits and a long is 32 bits on a machine?

    A
    -1L < 1U

    B
    -1L > 1U

    C
    -1L < 1UL

    D
    -1L > 1UL

    E
    syntax error

    Note: Not available
    1. Report
  6. Question: Which of the following is the correct way of initializing a two-dimensional array?

    A
    char str[2][4]={ "abc", "def" };

    B
    char str[2][4]={ {"abc"}, {"def"} };

    C
    char str[2][4]={ {'a','b','c','\0'}, {'d','e','f','\0'} };

    D
    all

    E
    none

    Note: Not available
    1. Report
  7. Question: Given the array:
    int num[3][4]= {
                        {3,6,9,12},
                        {15,25,30,35},
                        {66,77,88,99}
                        };
    what would be the output of *(*(num+1)+1)+1?

    A
    3

    B
    15

    C
    26

    D
    66

    E
    77

    Note: Not available
    1. Report
  8. Question: Which function will you use to write a formatted output to the file?

    A
    fputc()

    B
    fputs()

    C
    fprintf()

    D
    fseek()

    E
    ftell()

    Note: Not available
    1. Report
  9. Question: Given the array:
    int num[3][4]=
    {
    {3,6,9,12},
    {15,25,30,35},
    {66,77,88,99}
    };
    what would be the output of *(*(num+1))?

    A
    3

    B
    15

    C
    66

    D
    6

    E
    25

    Note: Not available
    1. Report
  10. Question: What would be printed on the standard output as a result of the following code snippet?
    main()
    {
            char option = 5;
            switch(option)
            {
                    case '5':
                                    printf("case : 1 \n");
                                    break;
                    case 5:
                                    printf("case : 2 \n");
                                    break;
                    default:
                                    printf("case : 3 \n");
                                    break;
            }
            return 0;
    }

    A
    case : 1

    B
    case : 2

    C
    case : 3

    D
    Result in compilation error

    E
    None

    Note: Not available
    1. Report
Copyright © 2024. Powered by Intellect Software Ltd