-
What is a modulus operator? What are the restrictions of a modulus operator?
A Modulus operator gives the remainder value. The result of x%y is obtained by(x-(x/y)*y). This operator is applied only to integral operands and cannot be applied to float or double.
-
-
-
-
-
-
-
What is the quickest searching method to use?
A binary search, such as bsearch() performs, is much faster than a linear search. A hashing algorithm can provide even faster searching. One particularly interesting and fast method for searching is to keep the data in a “digital trie.” A digital trie offers the prospect of being able to search for an item in essentially a constant amount of time, independent of how many items are in the data set....
-
-
How can I sort a linked list?
Both the merge sort and the radix sort are good sorting algorithms to use for linked lists.
-
-
-
-
How do you print an address?
The safest way is to use printf() (or fprintf() or sprintf()) with the %P specification. That prints a void pointer (void*). Different compilers might print a pointer with different formats. Your compiler will pick a format that’s right for your environment. If you have some other kind of pointer (not a void*) and you want to be very safe, cast the pointer to a void*: printf( “%Pn”, (void*) buffer...
-
-
-
-
What is the easiest sorting method to use?
The answer is the standard library function qsort(). It’s the easiest sort by far for several reasons: It is already written. It is already debugged. It has been optimized as much as possible (usually). Void qsort(void *buf, size_t num, size_t size, int (*comp)(const void *ele1, const void *ele2));
-
What is a function and built-in function?
A large program is subdivided into a number of smaller programs or subprograms. Each subprogram specifies one or more actions to be performed for a large program.such subprograms are functions. The function supports only static and extern storage classes.By default, function assumes extern storage class.functions have global scope. Only register or auto storage class is allowed in the function...
-
C Interview Questions
Ans