C Data Types 1 Questions and Answers

Practice Mode
Showing 10 of 50 questions
Q1
What is the size of "int" data type in C typically on a 32-bit system?
  • A 2 bytes
  • B 4 bytes
  • C 8 bytes
  • D Depends on compiler
Answer: Option B
Explanation: int is typically 4 bytes on 32-bit systems and 4 bytes on most 64-bit systems.
Q2
Which data type is used to store a single character in C?
  • A char
  • B string
  • C character
  • D chr
Answer: Option A
Explanation: char data type is used to store single characters in C.
Q3
What is the range of values for "signed char" data type?
  • A -128 to 127
  • B 0 to 255
  • C -256 to 255
  • D 0 to 127
Answer: Option A
Explanation: signed char has a range from -128 to 127.
Q4
Which modifier is used to create a constant variable in C?
  • A const
  • B constant
  • C final
  • D readonly
Answer: Option A
Explanation: const keyword is used to create read-only variables in C.
Q5
What is the size of "double" data type in C?
  • A 4 bytes
  • B 8 bytes
  • C 10 bytes
  • D 16 bytes
Answer: Option B
Explanation: double typically occupies 8 bytes of memory.
Q6
Which data type is suitable for storing true/false values in C?
  • A bool
  • B boolean
  • C int
  • D flag
Answer: Option C
Explanation: C uses int with 0 for false and non-zero for true, as there is no built-in boolean type in standard C.
Q7
What is the format specifier for "long double" in C?
  • A %Lf
  • B %lf
  • C %ld
  • D %Ld
Answer: Option A
Explanation: %Lf is used for long double in printf/scanf functions.
Q8
Which data type has the largest size in C?
  • A int
  • B double
  • C long double
  • D float
Answer: Option C
Explanation: long double typically has the largest size among basic data types (usually 10-16 bytes).
Q9
What is the default value of an uninitialized local variable in C?
  • A 0
  • B NULL
  • C Garbage value
  • D 1
Answer: Option C
Explanation: Uninitialized local variables contain garbage values in C.
Q10
Which data type is used to store whole numbers without decimal points?
  • A float
  • B double
  • C int
  • D char
Answer: Option C
Explanation: int is used for storing whole numbers without decimal points.
Questions and Answers for Competitive Exams Various Entrance Test