23 IT Interview Questions & Answers for Freshers
❝ Here I am providing some question and there answers which will help you to get job in IT Company. Question are related to only C programming ❞
1.what is C programming and why we use it?
☛ C is High level language.
☛ It is developed by Dennis Ritchie in 1970's at At &T Bell Labs.
☛ It is used to Develop system Software and application .
2. Why we use main ( ) Function in every C program?
☛ it is compulsory to use this function in every C program because execution
of the program begins with main ( ) .
3. What is meaning of header file?
☛ Header file Contains Declarations of pre -defined function.
☛ We can use any number of header file in our programs as per requirement
of pre defined functions.
4. Name some Header File?
☛ some header files are :-
- STDIO. H
- COINING. H.
- MATH. H
- STDLIB. H
- STRING. H
- GRAPHICS. H
5. What is meaning of #include ?
☛ It is processor Directive. It is used to Include any header file in our program.
6. Why We use VOID keyword before main ( ) ?
☛ Void is a data type.
☛ If We are using void then it gives instruction to Compiler that main ( ) function
will not return any value.
7. What is difference between < STDIO. H> and < CONIO. H> header files?
☛ STDIO. H contains Declarations of print f ( ) and Scan f ( ) .
☛ CONIO. H Contains Declarations of Clrscr ( )
Gtech ( ) .
8. What is print f ( ) ?
☛ Print F ( ) is a pre defined function. It is declared in STDIO. H
☛ This function is used to print some text on console.
9. What is Scan F ( ) ?
☛ Scan F ( ) is a pre defined function. It is declared in STDIO. H
☛ This is used to read some values from console.
10. What is Console .
☛ In simple terms Console is known as output screen through which user interacts with the source Code.
11. What are the modifiers available in C programming language?
Ans : There are 5 modifiers available in the C programming language as follows:
- Short
- Long
- Signed
- Unsigned
- long long
12. What is the main difference between Call by Value and Call by Reference?
Ans : When using Call by Value, you are sending the value of a variable as parameter to a function, whereas Call by Reference sends the address of the variable. And, under Call by Value, the value in the parameter is not affected by whatever operation that takes place, while in the case of Call by Reference, values can be affected by the process within the function
Ans : In simple terms Random numbers are generated in C using the rand() command. For example: anyNum = rand() will generate any integer number beginning from 0, assuming that anyNum is a variable of type integer.
14. What are comments and how do you insert it in a C program?
Ans : In simple terms Comments are a great way to put some remarks or description in a program. It is used as a reminder on what the program is all about, or a description on why a certain code or function was placed there in the first place. Comments begin with /* and ended by */ characters. Comments can be a single line, or can even span several lines. It can be placed anywhere in the program15. What are reserved words?
Ans : In simple terms Reserved words are words that are part of the standard C language library. This means that reserved words have special meaning and therefore cannot be used for purposes other than what it is originally intended for. Examples of reserved words are int, void, and return.
16. What are linked list?
Ans : In simple terms A linked list is composed of nodes that are connected with another. In C programming, linked lists are created using pointers. Using linked lists is one efficient way of utilizing memory for storage.
17. What is FIFO?
18. What are the different data types in C?
Ans: In simple terms printf() is used to print the values on the screen. To print certain values, and on the other hand, scanf() is used to scan the values. We need an appropriate datatype format specifier for both printing and scanning purpose.
23. Write a code to generate random numbers in C Language.