Share your repls and programming experiences

← Back to all posts
Surprise Code
ambitiousmumu (0)

For Abhi! :)
This code conveys how a string has 3 points to be considered.

  1. In actual C++ coding, we use std::string to declare, instead of char c[30]'
  2. By using variable[0]= ' '; you can modify any part of the string before printing.
  3. It is bad to use namespace because it gets inefficient in later stages of coding as your compiler needs to address namespace each time the related instruction is given.