Here is the list of most frequently asked questions about C and C++. These questions are prepared by experienced trainers of our institution. These questions and answers are helpful for freshers, intermediates, and professionals all alike. These questions will help you to clear all interviews and get the best job in the industry.
1. What are the features of C programming?
C programming language supports multiple features. They are Middle- Level programming language, Modularity, Portability, Structured oriented programming language, and Powerful data structure.
2. What are the data types in C?
There are two kinds of data types in C. They are Predefined data types and User Defined data types. Int, char, double, and float is Predefined data types. Pointers, arrays, strings, and structures are User-defined data types.
3. What are the types of errors in C?
Errors in C are divided into two types. They are Compile-time errors and Run time errors.
4. What is a Function in C?
Function is a collection of sets of statements.
5. What are the types of functions in C?
They are Pre-defined Functions and User-defined functions.
6. What are the Pre-defined Functions?
The functions which are coming with the compiler by default are known as Pre-defined Functions. E.g.:- sqrt, pow.
7. What are the User-defined Functions?
8. What are the types of control statements?
Conditional statements, Iterative statements, and Jump statements.
9. What are the conditional statements in C?
Conditional statements are the decision making statements in source code. They are of several types.
10. What are iterative statements in C?
We use iterative statements when we are going to use the repeated code. They are of several types.
11. What are Jump statements in C?
Jump statements are used to break the loop, continue the loop, and jump to the required statement. They are of several types.
12. What is a header file?
It is also known as a library file. It contains a set of functions. It contains a definition and a prototype of the program.
13. What is an assembler?
Assembler is used to convert assembly language to machine language. Assembly language is nothing but a low-level language.
14. What is a Compiler?
It converts high-level language to machine language.
15. What is Variable?
Variable is the name given to the memory space that may be used to store data. Its value can be changed depending on user requirements.
16. What are the different data types associated with the variable?
17. What are the different types of variables?
Local variable, global variable, and static variable.
18. How many keywords are used in C?
32 keywords are used in C.
19. What is the register variable in C?
It is a case of automatic variable and it is used to store data.
20. What is extern in C?
extern is a keyword used in C which is used to extend the visibility of c variable and c function.
21. What is token in C?
Token is the smallest basic component of source code.
22. What is the keyword?
Keyword has some predefined meaning and it cannot be changed.
23. What is Constant?
Constant have fixed values and it cannot be changed during the execution of the program.
24. What are the different types of operators?
25. What is the importance of an algorithm in C programming?
Algorithm provides step by step procedure on how a solution can be derived.
26. Is it possible to create your own header file?
Yes, it is possible to create your own customized header file. You can create it using the #include directive following the name of your header file.
27. What is the difference between the text file and a binary file?
Text file includes letters, numbers, and other characters. It is easily understood by humans. Binary files contain zeros and ones that only computers can understand and interpret.
28. Can we use a continue statement without using a loop?
No, continue statement can be used within the loop only.
29. What is an Array?
Array is the collection of the same data type elements. It is always fixed.
30. Can we change the array size at run time?
No, we cannot change the array size.
31. How are arrays different from normal variables?
Array holds multiple values whereas a normal variable holds a single value.
32. What is a dimensional array?
It is a type of linear array. Accessing its elements involves a single subscript which can be row or column index.
© 2020 Apponix, All Rights Reserved.