1. Question: What would be printed on the standard output as a result of the following code snippet?
    void main()
    {
        unsigned char a=25;
        a = ~a;
        signed char b = 25;
        b = ~b;
        printf("%d %d ", a, b);
    }

    A
    0 0

    B
    230 230

    C
    230 -26

    D
    230 -103

    E
    None

    Note: Not available
    1. Report
  2. Question: Which function will convert a string into a double precision quantity?

    A
    atoi()

    B
    atof()

    C
    atol()

    D
    atan()

    E
    acos()

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

    A
    Rational

    B
    Unary

    C
    Ternary

    D
    Compound assignment

    E
    Logical

    Note: Not available
    1. Report
  4. Question: The declaration int *(*p)[10] indicates:

    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 integer pointers

    D
    p is a pointer to a character string

    E
    None

    Note: Not available
    1. Report
  5. Question: What will be printed on the standard output as a result of the following code snippet?
    void main()
    {
            int num1 = 30, num2 = 4;
            float result;
            result = (float)(num1/num2);
            printf("%.2f", result);
            return 0;
    }

    A
    7

    B
    7.00

    C
    7.000000

    D
    7.5

    E
    7.50

    Note: Not available
    1. Report
  6. Question: What is the output of the following program ?
    main()
    {
    
    int u = 1, v = 3;
    printf("%d %d",u,v);
    funct1(&u,&v);
    printf(" %d %d\n",u,v);
    }
    
    void funct1(int *pu, int *pv)
    {
    *pu=0;
    *pv=0;
    return;
    }

    A
    1 3 1 3

    B
    1 3 1 1

    C
    1 3 0 0

    D
    1 1 1 1

    E
    3 1 3 1

    Note: Not available
    1. Report
  7. Question: Which of the following is/are the correct signature/s of main with command line arguments?

    A
    int main(int argc, char **argv)

    B
    int main(int argc, char *argv[])

    C
    int main(int argc, char *argv)

    D
    int main(int argc, char argv[])

    E
    All

    Note: Not available
    1. Report
  8. Question: From which of the following loop or conditional constructs, is "break" used for an early exit?

    A
    switch

    B
    for

    C
    while

    D
    do-while

    E
    All

    Note: Not available
    1. Report
  9. Question: Given the operators: 1) * 2) / 3) % What would be the order of precedence?

    A
    1,2,3

    B
    1,3,2

    C
    3,2,1

    D
    All have the same precedence

    E
    1 and 2 have the same precedence, 3 is of lower precedence

    Note: Not available
    1. Report
  10. Question: Which of the following declarations of structures is/are valid? 1)
    struct node {
    int count;
    char *word;
    struct node next;
    }Node;
    2)
    struct node {
    int count;
    char *word;
    struct node *next;
    }Node;
    3)
    struct node {
    int count;
    char *word;
       union u1 {
             int n1;
             float f1;
        }U;
    }Node;

    A
    1,2,3

    B
    1,2

    C
    2,3

    D
    2

    E
    None

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