Posts

C Programming Interview Question and Answer SET 8

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...

C Programming Interview Question and Answer SET 7

121. Predict the output or error main()             {             int k=1;             printf("%d==1 is ""%s",k,k==1?"TRUE":"FALSE");             } Ans: 1==1 is TRUE Explanation: When two strings are placed together (or separated by white-space) they are concatenated (this is called as "stringization" operation). So the string is as if it is given as "%d==1 is %s". The conditional operator( ?: ) evaluates to "TRUE". 122. What is use of void data type? Void is an empty data type normally used as a return type in C/C++, C#, Java functions/methods to declare that no value will be return by the function. The another used of void is to declare the pointer in C/C++ where It is not sure what data type is addressed by the pointer. 123. four type of sc...

C Programming Interview Question and Answer SET 6

101. What is the difference between %d and %*d in c language? %d give the original value of the variable and %*d give the address of the variable. eg:-int a=10,b=20; printf("%d%d",a,b); printf("%*d%*d",a,b); Result is 10 20 1775 1775 .Here 1775 is the starting address of the memory allocation for the integer.a and b having same address because of contagious memory allocation. 102. How does a C program come to know about command line arguments?  When we execute our C program, operating system loads the program into memory. In case of DOS, it first loads 256 bytes into memory, called program segment prefix. This contains file tables,environment segment, and command line information. When we compile the C program the compiler inserts additional code that parses the command, assigning it to the argv array, making the arguments easily accessible within our C program. 103. How are pointer variables initialized?  Pointer variable are initialized ...