C Language Quiz (Set 19) C Language (Set 9) 1 / 10 What is the purpose of the 'offsetof' macro in C? To calculate the size of a data structure. To determine the position of a field within a structure. To include a header file. To calculate the difference between two pointers. 2 / 10 Which C library function is used to convert a long integer to a string in a specific base? ltobase ltoa longtobase inttobase 3 / 10 What is the purpose of the 'putchar' function in C? To display a character on the screen. To write a character to a file. To retrieve a character from a string. To get a character input from the user. 4 / 10 Which C library function is used to write a formatted output to a string? strwrite swritef sprintf stringformat 5 / 10 What is the purpose of the 'goto' statement in C? To end a loop. To jump to a specific location in the code. To define a new function. To print output. 6 / 10 In C, what is the purpose of the 'wint_t' data type? To store wide characters. To store floating-point values. To represent time and date. To store wide integers. 7 / 10 What is the purpose of the 'volatile' keyword when used in a structure member declaration in C? To declare a volatile member in the structure. To indicate that the structure is volatile. To define a volatile structure. To indicate that the structure uses volatile variables. 8 / 10 Which C library function is used to perform dynamic memory allocation? malloc memalloc dynalloc memoryalloc 9 / 10 What is the result of the expression '10 % 3' in C? 3.33 1 2 0.33 10 / 10 What is the purpose of the 'volatile' keyword when used in a function definition in C? To indicate that the function returns a volatile value. To declare a volatile function. To indicate that the function uses volatile variables. To define a pointer to a volatile function. Your score isThe average score is 0% 0% Restart quiz