1. Question: What would be printed on the standard output as a result of the following code snippet?
    main( )
    {
    char *str[ ] = {
    "Manish"
    "Kumar"
    "Choudhary"
    };
    printf ( "\nstring1 = %s", str[0] );
    printf ( "\nstring2 = %s", str[1] );
    printf ( "\nstring3 = %s", str[2] );
    }

    A
    string1 = Manish string2 = Kumar string3 = Choudhary

    B
    string1 = Manish string2 = Manish string3 = Manish

    C
    string1 = ManishKumarChoudhary string2 = (null) string3 = (null)

    D
    You will get an error message from the compiler

    E
    Compiler error

    Note: Not available
    1. Report
  2. Question: What would be printed on the standard output as a result of the following code snippet?
    main()
    {
            int n=5, x;
            x = n++;
            printf("%d ", x);
            x = ++n;
            printf("%d ", x++);
            printf("%d", x);
            return 0;
    }

    A
    6 7 8

    B
    5 7 8

    C
    6 8 8

    D
    5 8 8

    E
    None

    Note: Not available
    1. Report
  3. Question: In which area of memory are static variables allocated?

    A
    stack

    B
    heap

    C
    With the code binary

    D
    None

    E
    Both stack and heap

    Note: Not available
    1. Report
  4. Question: Which standard function is used to deallocate memory allocated by the malloc() function?

    A
    free

    B
    calloc

    C
    delete

    D
    release

    E
    destroy

    Note: Not available
    1. Report
  5. Question: Read the statement below:
    extern int a;
    Which of the following statement/s pertaining to the above statement is/are correct?

    A
    Declares an integer variable a; Allocates storage for the variable

    B
    Declares an integer variable a; Does not allocate the storage for the variable

    C
    Indicates that the variable is defined outside the current file

    D
    Brings the scope of the variable defined outside the file to this file

    E
    All

    Note: Not available
    1. Report
  6. Question: The declaration int (*p[5])() means:

    A
    p is an array of pointers to functions the return type of which is an integer

    B
    p is a pointer to a function that returns a pointer to an integer

    C
    p is a pointer to an array of integers

    D
    p is a pointer to an array of integer pointers

    E
    p is a pointer to a character string

    Note: Not available
    1. Report
  7. Question: What will be printed on the standard output as a result of the following code snippet?
    void main()
    {
            int arr[5]={1,2,3,4,5};
            printf("%d\n", *(arr+4));
    }

    A
    1

    B
    2

    C
    4

    D
    5

    E
    Cannot be determined

    Note: Not available
    1. Report
  8. Question: What would be printed on the standard output as a result of the following code snippet?
    main()
    {
    char *pmessage = "asdfgh";
    *pmessage++;
    printf("%s", pmessage);
    return 0;
    }

    A
    Will result in Compilation Error

    B
    Undefined string

    C
    sdfgh

    D
    asdfgh

    E
    Compiler Error

    Note: Not available
    1. Report
  9. Question: Which function returns the current pointer position within a file?

    A
    ftell()

    B
    fseek()

    C
    fgetc()

    D
    fread()

    E
    fscanf()

    Note: Not available
    1. Report
  10. Question: Which of the following is not a relational operator?

    A
    ==

    B
    !=

    C
    <>

    D
    >=

    E
    <=

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