1. Question: What does the argv[0] represent?

    A
    The first command line parameter has been passed to the program

    B
    The program name

    C
    The number of command line arguments

    D
    None

    E
    All

    Note: Not available
    1. Report
  2. Question: What will happen when the following code is executed?
    void main()
    {
        char arr1[] = "REGALINT";
        char arr2[10] = "REGALINT";
        printf("%d,",sizeof(arr1));
        printf("%d",sizeof(arr2));
    }

    A
    1,1

    B
    1,4

    C
    8,8

    D
    8,9

    E
    9,10

    Note: Not available
    1. Report
  3. Question: What will be the output of the following program?
    #include <assert.h>
    main()
    {
    int n = 5;
    assert(n > 3); //statement 1
    n = n+2;
    assert(n > 7);//statement 2
    return 0;
    }

    A
    Assertion 'n > 3' failed; Program aborts at statement 1

    B
    Assertion 'n > 7' failed; Program aborts at statement 2

    C
    Program returns 0 with the value of n as 7

    D
    Compilation Error

    E
    None

    Note: Not available
    1. Report
  4. Question: Which of the following is a function for formatting data in memory?

    A
    sprintf()

    B
    printf()

    C
    scanf()

    D
    free()

    E
    atol()

    Note: Not available
    1. Report
  5. Question: Which function allocates memory and initializes elements to 0?

    A
    assign()

    B
    calloc()

    C
    malloc()

    D
    swab()

    E
    allocate()

    Note: Not available
    1. Report
  6. Question: Is the following statement correct? If not, why not? If yes, what is the size of the array?
    int array[][3] = { {1,2}, {2,3}, {3,4,2} };

    A
    Yes, the size is three columns by two rows

    B
    Yes, the size is two columns by two rows

    C
    No, the first dimension is omitted

    D
    No, one of the three initializer sets contains too many numbers

    E
    Yes, the size is three columns by three rows

    Note: Not available
    1. Report
  7. Question: Which of the following sets of conversion statements may result in the loss of data?

    A
    int i; char c; i=c; c=i;

    B
    int i; char c; i=c; c=i;

    C
    int i; float f; i=f; f=i;

    D
    None

    E
    All

    Note: Not available
    1. Report
  8. Question: Consider the following code.
    int i = 4, *j, *k;
    Which one of the following statements will result in Compilation error?

    A
    j = &i;

    B
    j = j + 4;

    C
    j = j - 2;

    D
    k = j + 3;

    E
    j = j * 2;

    Note: Not available
    1. Report
  9. Question: What would be printed on the standard output as a result of the following code snippet?
    main()
    {
            enum {red, green, blue = 0, white};
            printf("%d %d %d %d", red, green, blue, white);
            return 0;
    }

    A
    Will result in Compilation Error

    B
    0 1 2 3

    C
    0 1 0 1

    D
    0 1 0 2

    E
    Undefined

    Note: Not available
    1. Report
  10. Question: By which file function you can position the file pointer in accordance with the current position?

    A
    ftell()

    B
    fseek()

    C
    fgetc()

    D
    fread()

    E
    fscanf()

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