Wednesday, December 4, 2013

Nitheen Kumar

C Language Interview Questions 10

135. What is far pointer?
The pointer which can point or access whole the residence memory of RAM i.e. which can access all 16 segments is known as far pointer.

136. What is pascal and cdecl keyword in c language?
There are two types of parameters passing conventions in c:
1. pascal: In this style function name should (not necessary ) in the uppercase .First parameter of function call is passed to the first parameter of function definition and so on.
2. cdecl: In this style function name can be both in the upper case or lower case. First parameter of function call is passed to the last parameter of function definition. It is default parameter passing convention.

137. What is use of #pragma inline directive in c language?
#pragma inline only tells the compiler that source code of program contain inline assembly language code .In c we can write assembly language program with help of asm keyword.

138. What is the meaning of multilevel pointers in c?
A pointer is pointer to another pointer which can be pointer to others pointers and so on is known as multilevel pointers. We can have any level of pointers.

139. What is huge pointer in c?
The pointer which can point or access whole the residence memory of RAM i.e. which can access all the 16 segments is known as huge pointer.

140. Is it possible to rename any function in c?

Yes, we can rename any function using typedef keyword. It is useful when function declaration is too complex and we have to give any simple name or if we have to create more numbers of function of the same type.

141. Do you know, what is the meaning and use of static keyword in c?
Keyword static is used for declaring static variables in c. This modifier is used with all data types like int, float, double, array, pointer, structure, function etc.

142. What is difference between .com program and .exe program?
Both .com and .exe program are executable program but .com program execute faster than .exe program. All drivers are .com program. .com file has higher preference than .exe For example:

143. Difference between TSR and TSO program
TSO means terminate but stay outside. It is that program, which release the main memory after the execution of the program. Example ms paint, notepad, turbo c compilers etc.
TSR means terminate but stay residence .It is those program, which after the execution of the program does not release the RAM (main memory).e.g. antivirus.

144. Describe turbo c compiler?
Turbo c is an IDE of c programming language created by Borland. Turbo C 3.0  is based on MS DOS operation  system. It is one of the most popular c compilers. It uses 8086 microprocessor which is 16 bit microprocessor. It has 20 address buses and 16 data bus. Its word length is two byte.

145. Out of fgets() and gets() which function is safe to use and why?
fgets() is safer than gets(), because we can specify a maximum input length. Neither one is completely safe, because the compiler can’t prove that programmer won’t overflow the buffer he pass to fgets ().

146. Difference between strdup and strcpy?
Both copy a string. strcpy wants a buffer to copy into. strdup allocates a buffer using malloc().
Unlike strcpy(), strdup() is not specified by ANSI .

147. Differentiate between a for loop and a while loop? What are it uses?
For executing a set of statements fixed number of times we use for loop while when the number of
iterations to be performed is not known in advance we use while loop.

148. What is storage class? What are the different storage classes in C?


Storage class is an attribute that changes the behavior of a variable. It controls the lifetime, scope and linkage. The storage classes in c are auto, register, and extern, static, typedef.

149. What are the uses of a pointer?
(i)It is used to access array elements
(ii)It is used for dynamic memory allocation.
(iii)It is used in Call by reference
(iv)It is used in data structures like trees, graph, linked list etc.

150.In header files whether functions are declared or defined?
Functions are declared within header file. That is function prototypes exist in a header file,not function bodies. They are defined in library (lib).

Prv 1 2 3 4 5 6 7 8 9 10 11 Next

Subscribe to get more Posts :