C Programming Question Bank with Answers Pdf - 1
Question: 1
What is arithmetic operator in C?
C Arithmetic operators are used to perform mathematical calculations like addition, subtraction, multiplication, division and modulus in C programs.
Arithmetic operators are +, -, *, /, %.
Question: 2
Is pointer arithmetic a valid one?
Pointer arithmetic is not valid one. Pointer addition, multiplication and division are not allowed as these are not making any sense in pointer arithmetic.
Question: 3
What is the difference between call by value and call by reference?
When using Call by Value, you are sending the value of a variable as parameter to a function.
Where Call by Reference sends the address of the variable. Also 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 functions.
Question: 4
When can void pointer and null pointer be used in C?
Void pointer is a generic pointer that can be used to point another variable of any data type.
Null pointer is a pointer which is pointing to nothing.
Question: 5
Is void pointer arithmetic a valid one?
Arithmetic operation on void pointer is not valid one. Void pointer is a generic pointer.
It is not referring int, char or any other data type specifically.
So, we need to cast void pointer to specific type before applying arithmetic operations.
- 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
Gross Domestic Product and Its Growth Class 10 Questions Pdf More
Industrial Cluster in Tamil Nadu TNPSC Questions Pdf More
Food and Security TNPSC Questions Pdf More
Economics Food Security and Nutrition Class 10 Questions Pdf More
Class 10th Social Indian Constitution Pdf More
1000+ Objective Computer Awareness Pdf More
1000+ Hard Puzzles Questions and Answers More
Analogy Questions and Answers Pdf for Bank Exams More
Chemistry Gk Questions and Answers 2020-2021 More
IBPS RRB PO Computer Awareness Previous Year Question Paper More