Quiz_Index

Add Question

Question Option1 Option2 Option3 Option4 Option5 Answer
Which of the following special symbol allowed in a variable name? .* (asterisk) | (pipeline) - (hyphen) _ (underscore) All above D Edit | Details | Delete
Which of the following statements are correct about the below C-program? int main() { int x = 10, y = 100%90, i; for(i=1; i<10; i++) if(x != y); printf("x = %d y = %d\n", x, y); return 0; } The printf() function is called 10 times. The program will produce the output x = 10 y = 10 The ; after the if(x!=y) will NOT produce an error. The program will not produce output. None Of These B Edit | Details | Delete
How would you round off a value from 1.66 to 2.0? ceil(1.66) floot(1.66) roundup(1.66) roundto(1.66) None Of These A Edit | Details | Delete
What are the different types of real data type in C ? float, double short int, double, long int float, double, long, double double, long int, float None Of These C Edit | Details | Delete
Which header file should be included to use functions like malloc() and calloc()? memory.h stdlib.h stdlib.h None of these dos.h B Edit | Details | Delete
What function should be used to free the memory allocated by calloc() ? dealloc(); malloc(variable_name, 0) free(); memalloc(variable_name, 0) None Of These C Edit | Details | Delete
If you pass an array as an argument to a function, what actually gets passed? Value of elements in array First element of the array Base address of the array Address of the last element of array None Of These C Edit | Details | Delete
Which of the following function sets first n characters of a string to a given character? strinit() strnset() strset() strcset() None Of These B Edit | Details | Delete
How will you print \n on the screen? printf("\n"); echo "\\n"; printf('\n'); printf("\\n"); None Of These D Edit | Details | Delete
What do the following declaration signify? char *scr; scr is a pointer to pointer variable. scr is a function pointer. scr is a pointer to char. scr is a member of function pointer. None Of These C Edit | Details | Delete
The maximum combined length of the command-line arguments including the spaces between adjacent arguments is 128 characters 256 characters 67 characters It may vary from one operating system to another 255 charcters D Edit | Details | Delete
Which of the following are unary operators in C? 1.! 2.sizeof 3.~ 4.&& 1, 2 1, 3 2, 4 1, 2, 3 2,3 D Edit | Details | Delete
Which standard library function will you use to find the last occurance of a character in a string in C? strnchar() strchar() strchar() strrchr() None Of These D Edit | Details | Delete
We declare a function with ______ if it does not have any return type Long Double Void int None Of These C Edit | Details | Delete
A function that calls itself for its processing is known as Inline Function Nested Function Overloaded Function Recursive Function None Of These D Edit | Details | Delete
Out of fgets() and gets() which function is safe to use? gets() fgets() Both None of these B Edit | Details | Delete
In the following code what is 'P'? typedef char *charp; const charp P; P is a constant P is a character constant P is character type P is a int None of above A Edit | Details | Delete
What will the function rewind() do? Reposition the file pointer to a character reverse. Reposition the file pointer stream to end of file. Reposition the file pointer to begining of that line. Reposition the file pointer to begining of file. None of above D Edit | Details | Delete