C Programming Basics Questions and Answers Pdf - 1
Question: 1
What is the difference between Logical AND and Bitwise AND?
Logical AND (&&): Only used in conjection with two expressions, to test more than one condition. If both the conditions are true then returns 1.
If false then return 0.
Bitwise AND (&): Only used in bitwise manipulation. It is an Unary operator.
Question: 2
What is the difference between int, char, float and double data types?
Integer data type allows a variable to store numeric values. The storage size of int data type is 2 or 4 or 8 byte. It varies depend upon the processor in the CPU.
Character data type allows a variable to store only one character. Storage size of character data type is 1.
Float data type allows a variable to store decimal values. Storage size of float data type is 4. This also varies depend upon the processor in the CP.
Double data type is also same as float data type which allows up to 10 digits after decimal.
Question: 3
What is the difference between variable declaration and variable definition in C?
Variable declaration tells the compiler about data types and size of the variable. Whereas, variable definition allocates memory to the variable.
Variable can be declared many times in a program. but definition can happen only one time for a variable in a program.
Variable declaration is for assignment of properties and identification to a variable. Whereas, variable definition is for assignments of storage space to a variable.
Question: 4
What is the difference between auto variables and static variable in C?
Both auto and static variables are local variables.
Static variables can retain the value of the variable between different function calls.
But, scope of auto variable is within the function only. It can’t retain the value of the variable between different function calls.
Question: 5
List out any unary operators and their functions.
++ Increment
-- Decrement
* Indirection
& Address of
! Negation (logical NOT)
- 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
Signals and Systems Quiz Questions and Answers Pdf More
Signals and Systems MCQ Questions and Answers Pdf More
Electrical Power Sources Quiz Questions & Answers Pdf More
Electromagnetic Field Theory Question Bank 2024-2025 More
Power Semiconductor Device and Integrated Circuits Questions More
100+ Reconstruction of Sentences Questions and Answers More
7000+ TNPSC Group 1, 2, 2a, 4 Mock Test 2024-2025 Free More
100+ Logical Reasoning Questions and Answers More
Industrial Engineering & Production Management MCQ Questions More
Java Interview Questions and Answers for 3 Years Experience More