C Language Quiz (Set 8) C Language (Set 8) 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? ltos long2str ltoa inttolong 3 / 10 What is the purpose of the 'getchar' function in C? To get a single character input from the user. To retrieve a character from a string. To get a character from a file. To display a character on the screen. 4 / 10 Which C library function is used to read a formatted input from a string? fscanf readstr sscanf strread 5 / 10 What is the purpose of the 'continue' statement in C? To end the loop completely. To skip the current iteration and continue to the next one. To pause the loop temporarily. To restart the loop from the beginning. 6 / 10 In C, what is the purpose of the 'wchar_t' data type? To store wide characters. To store integer values. To store floating-point values. To represent time and date. 7 / 10 What is the purpose of the 'volatile' keyword when used in a pointer declaration in C? To declare a volatile pointer. To indicate that the pointer points to volatile data. To define a pointer with volatile memory allocation. To create a pointer to a volatile function. 8 / 10 Which C library function is used to convert a string to a long double? strtod strlongdouble strld strtold 9 / 10 What is the result of the expression 'sizeof(float)' in C? 4 2 8 Depends on the system architecture. 10 / 10 What is the purpose of the 'asm' keyword in C? To define an assembly language function. To include an assembly language file. To indicate that a block of code is written in assembly language. To declare an assembly variable. Your score isThe average score is 0% 0% Restart quiz