My Report

C Programming Mock Test 9


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

Question 1 of 10

1. What is the purpose of the given C code?

#include <stdlib.h> 
_Mbsave _Mbxtowc = {0};  
int (mbtowc) (wchar_t *pwc, const char *a, size_t n) 
{
return (-Mbtowc (pwc, s, n, &-Mbxtowc) ) ;
}

Question 1 of 10

Question 2 of 10

2. _______variable type defined in the header stdlib.h is an integer type of the size of a wide character constant.

Question 2 of 10

Question 3 of 10

3. The mbstowcs() function is used to return the number of array elements modified, not including a terminating zero code, if any.

Question 3 of 10

Question 4 of 10

4. Which function is used to recombine the fraction and exponent parts of a floating-point value after you have worked on them separately?

Question 4 of 10

Question 5 of 10

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

int main () 
{ 
   printf("starting of program\n"); 
   printf("program exits\n"); 
   exit(0);  
   printf("program ends\n");  
   return(0); 
} 

Question 5 of 10

Question 6 of 10

6. The number of bytes contained in the multibyte character pointed to by a character is ___________

Question 6 of 10

Question 7 of 10

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

char str[20];
str= "123546"; res= atof(str);
printf("String value = %s, Float value = %f\n", str, res);

Question 7 of 10

Question 8 of 10

8. Which of the following is the correct description of the macro SIGFPE?

Question 8 of 10

Question 9 of 10

9. Which function searches an environmenr list that are provided by the host environment?

Question 9 of 10

Question 10 of 10

10. The______function is used to convert the initial portion of the string pointed to by, to unsigned long int representation.

Question 10 of 10


 

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.