My Report

C Programming Practice Test 8


Correct Answer: 2 points | Wrong: -1 point
Grades: A* (100% score) | A (80%-99%) | B (60%-80%) | C (40%-60%) | D (0%-40%)
advertisement

1. Which of the following keywords is used to define an alternate name for an already existing data type?

2. Which data type is suitable for storing a number like?

10.0000000001

3. What will be the output of the following C code?

errno = 0;
y = sqrt(2);
if(errno == EDOM)
printf("Invalid value\n");
else
printf("Valid value\n");

4. Which among the following is Copying function?

5. _______ occurs when a result is too large in magnitude to represent errors as a floating-point value of the required type.

6. What will be the output of the following C code?

    #include <stdio.h>
    (sizeof double = 8, float = 4, void = 1)
    #define PI 3.14
    int main()
    {
        printf("%d", sizeof(PI));
    } 

7. What error occurs when a result is undefined for a given argument value?

8. Which among the following statement is right?

9. What will be the size of the following C structure?

    #include <stdio.h>
    struct temp
    {
        int a[10];
        char p;
    }; 

10. Use_______to determine the null-terminated message string that corresponds to the error code errcode.


 

Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.