Skip to content
Question Bank (2 marks) · Q16

Q.What is a string constant? Give an example.

Karnataka PUCTextbookShort· 2mImportance★★★★★est
53% · 81/154 Questions
🔒 Locked · start free trial →

You're viewing a preview — the full solution, concept, methods & PYQ mapping are locked.

Start your 14-day free trial to unlock the full solution →

[!TLDR]

A string constant is characters enclosed in double quotes, e.g. "Hello".

A string constant (string literal) is a group of characters written within double quotation marks, such as "PUC" or "Hello World". The compiler stores it as an array of characters and automatically adds a null character '\0' at the end to mark where the string finishes. This distinguishes a string like "A" (two bytes: 'A' and ' …

Unlock everything free for 14 days

  • Full step-by-step solutions
  • Concept-first explanations
  • Methods, shortcuts & mistakes
  • PYQ mapping + timed mock tests

Full access for 14 days. No credit card required.