C Programming Question and Answers
29. | What is pointer linking with operating system? |
---|---|
When we declare a null pointer it addresses the 0 address which is the address of operating system so we cannot use that address this is what the pointer is linked to OS. | |
30. | Is there a built in function in C that can be used for sorting data? |
---|---|
Yes, use the qsort() function. It is also possible to create user defined functions for sorting, such as those based on the balloon sort and bubble sort algorithm. | |
31. | What does the function toupper() do? |
---|---|
It is used to convert any letter to its upper case mode. Toupper() function prototype is declared in <ctype.h>. Note that this function will only convert a single character, and not an entire string. | |
32. | What is NULL in C? |
---|---|
NULL is a macro which defined in C header files. The value of NULL macro is 0. It is defined in C header files as below #define NULL (void *) 0; NULL is used for pointers only as it is defined as (void *) 0. It should not be used other than pointers. If NULL is assigned to a pointer, then pointer is pointing to nothing. |
|