C Language Interview Questions and Answers for Experienced - 8
Question: 36
What is pointer in C?
Pointer is a variable that stores/points the address of another variable. Normal variable stores the value of the variable whereas pointer variable stores the address of the variable.
syntax: data_type * var_name;
Where, * is used to denote that “p” is pointer variable and not a normal variable.
Question: 37
What are the advantages of using typedefs in a program?
The advantages of using typedefs in a program are
It makes writing of complicated declaration a lot easier, which in turn helps in eliminating lot of typographical errors.
It also helps in achieving portability in programs. Suppose there are some data types that are machine dependent and we use typedefs for those data types, then we only need to change typedefs as we move to new machine platform.
Question: 38
Is it possible to write a program without a main() functions?
No, the main functions is mandatory. The execution of all programs begins from the main() function.
Question: 39
What are the different types of errors?
The types of errors are syntax error, logical error, and runtime error.
Syntax error results from the violation of the grammar (syntax) of C language. In the process of syntax errors, the program will not compile.
Logical errors result from the wrong logic that in turn result from the poor understanding of the problem under consideration. Even in the process of logical errors, the program will run but the results will be incorrect. These errors are most difficult to locate particularly if the problem is large and complex.
Runtime errors result either from non availability of the resource required such an attempt to open/read from a non existing data file or memory allocation failure, etc. or an attempt to perform an illegal operation such as division by zero, taking square root or logarithm of a negative number etc. In the presence of these errors, the program will terminate prematurely, i.e., before finishing its intended task. Premature termination is also known as abnormal terminal.
Errors are also known as bugs.
Question: 40
What is debugging?
It is the process of locating and correcting the bugs.
- Top 500+ C Language Interview Questions and Answers Pdf
- C Language Interview Questions and Answers
- C Language Interview Questions and Answers for Freshers
- C Language Interview Questions and Answers for Experienced
- C Programming Interview Questions and Answers
- Embedded C Interview Questions and Answers Pdf
- Top 200+ Advanced C Language Interview Questions 2020-2021
- C Programming Question Bank with Answers Pdf
- C Programming Interview Questions and Answers for Freshers
- C Programming Interview Questions and Answers for Experienced
- C Programming Basics Questions and Answers Pdf
- 1000+ Advanced C Programming Interview Questions & Answers
- 1000+ C Interview Questions and Answers 2023 - 2024 Pdf
- 1000+ C Programming Coding Questions and Answers
- 1000+ C Basic Interview Questions for Freshers Pdf
- 1000+ C Questions and Answers Pdf
Samacheer Kalvi Class 10 Science Nuclear Physics Questions More
Class 10 Science Acoustics Exam Questions & Answers Pdf More
Samacheer Kalvi Class 10 Science Acoustics Questions & Answers More
Agricultural Engineering Multiple Choice Questions and Answers Pdf More
Soil, Water Conservation Engineering, Hydrology, Surveying MCQ Questions More
Secondary Growth in Plants NEET Questions Pdf More
7000+ Banking Awareness 2024 - 2025 Pdf More
Top 500+ TNPSC Biology/Botany Important Questions 2019-2020 More
General English Questions and Answers for LDC Pdf More
Top 50+ OOPS Concepts Interview Questions and Answers More