engineering computer science MCQ #713

What is the difference between CHAR and VARCHAR data types?

engineering computer science MCQ #713

  1. Question 1

    Q1. What is the difference between CHAR and VARCHAR data types?

    • A) CHAR is fixed-length, VARCHAR is variable-length
    • B) CHAR is variable-length, VARCHAR is fixed-length
    • C) CHAR stores numbers, VARCHAR stores strings
    • D) CHAR stores dates, VARCHAR stores times

    Answer: CHAR is fixed-length, VARCHAR is variable-length

    Explanation: CHAR is a fixed-length data type, while VARCHAR is a variable-length data type, allowing for more flexible storage of strings.