1. Basic Concepts

What are Char Arrays?

char str[] = "hello";  // Automatically adds '\\0' at end
char arr[100];         // Declares array of 100 characters

Key Characteristics


2. Input Issues & Solutions

Problem with cin

// ❌ PROBLEM: cin stops at space, tab, or newline
char name[100];
cin >> name;  // Input: "Vishal Rajput" → Only stores "Vishal"

Why? The cin object has delimiters for:

It stops inserting data after encountering these delimiters.

Solutions