Welcome to Your Quiz: Aptitude Test C Programming For Data Types

Name Email
1.

Which is correct with respect to size of the datatypes?

(Visited 109 times, 1 visits today)
2.

Which of the following % operation is invalid?

(Visited 109 times, 1 visits today)
3.

What is the output of this C code?
    int main()
    {
        float a = 5.477777777777;
        printf("%f", a);
    }

(Visited 109 times, 1 visits today)
4.

What is the size of float in a 32-bit compiler?

(Visited 109 times, 1 visits today)
5.

%f access specifier is used for?

(Visited 109 times, 1 visits today)
6.

What is short int in C programming?

(Visited 109 times, 1 visits today)
7.

The number of digits present after decimal in float is________.

(Visited 109 times, 1 visits today)
8.

Comment on the output of this C code?
    int main()
    {
        float f1 = 0.1;
        if (f1 == 0.1)
            printf("equal\n");
        else
            printf("not equal\n");
    }

(Visited 109 times, 1 visits today)
9.

Which of the following is a User-defined data type?

(Visited 109 times, 1 visits today)
10.

Which data type is most suitable for storing a number 65000 in a 32-bit system?

(Visited 109 times, 1 visits today)
11.

What is the output of this C code?
    int main()
    {
        float x = 'a';
        printf("%f", x);
        return 0;
    }

(Visited 109 times, 1 visits today)
12.

The format identifier ‘%i’ is also used for _____ data type?

(Visited 109 times, 1 visits today)
13.

Select the odd one out with respect to type?

(Visited 109 times, 1 visits today)
14.

What is the output of this C code?
    int main()
    {
       char chr;
       chr = 128;
       printf("%d\n", chr);
       return 0;
    }

(Visited 109 times, 1 visits today)
15.

Comment on the output of this C code?
    int main()
    {
        float f1 = 0.1;
        if (f1 == 0.1f)
            printf("equal\n");
        else
            printf("not equal\n");
    }

(Visited 109 times, 1 visits today)
16.

What is the size of an int data type?

(Visited 109 times, 1 visits today)
17.

Which of the datatypes have size that is variable?

(Visited 109 times, 1 visits today)
18.

Comment on the output of this C code?
    int main()
    {
        int a[5] = {1, 2, 3, 4, 5};
        int i;
        for (i = 0; i < 5; i++)
            if ((char)a[i] == '5')
                printf("%d\n", a[i]);
            else
                printf("FAIL\n");
    }

(Visited 109 times, 1 visits today)
19.

What is the output of this C code (on a 32-bit machine)?
    int main()
    {
        int x = 10000;
        double y = 56;
        int *p = &x;
        double *q = &y;
        printf("p and q are %d and %d", sizeof(p), sizeof(q));
        return 0;
    }

(Visited 109 times, 1 visits today)
20.

Loss in precision occurs for typecasting from____________.

(Visited 109 times, 1 visits today)

Thank You for Submitting your response for Quiz

Aptitude Test C Programming For Data Types

Please click on View Result Button to see the Result.



(Visited 109 times, 1 visits today)
Show Buttons
Hide Buttons