C Language Quiz (Set 5) C Language (Set 5) 1 / 10 What is the purpose of the 'ptrdiff_t' data type in C? To store pointer differences. To store floating-point values. To store integer values. To represent time differences. 2 / 10 Which C library function is used to search for a character in a string? searchchar charfind strchr findchar 3 / 10 What is the purpose of the 'size_t' data type in C? To store the size of an array. To store a character value. To represent a boolean value. To store a pointer value. 4 / 10 Which operator is used to access a structure member in C? >> [] -> :: 5 / 10 What is the purpose of the 'enum' data type in C? To store a sequence of characters. To define a structure with multiple fields. To represent a set of named integer constants. To create a variable with a unique name. 6 / 10 In C, what is the purpose of the 'restrict' keyword? To declare a variable as restricted access. To define a restricted memory region. To indicate that a pointer does not alias any other pointer. To include a restricted header file. 7 / 10 What is the purpose of the 'inline' keyword in C? To declare a function as a macro. To declare a function as an inline function. To include a header file. To define a variable with inline memory allocation. 8 / 10 Which C library function is used to convert a floating-point number to a string? ftoa ftostr floattostr sprintf 9 / 10 What is the difference between 'int' and 'unsigned int' data types in C? 'int' is larger in size than 'unsigned int'. 'int' can store negative values while 'unsigned int' cannot. 'unsigned int' can store larger values than 'int'. There is no difference; they are the same data type. 10 / 10 What is the purpose of the 'register' keyword in C? To declare a variable as a register variable. To define a variable with register memory allocation. To indicate the start of a loop. To include a header file. Your score isThe average score is 0% 0% Restart quiz