• Home
  • Interview Questions
    • Computer Science
    • Civil Engineering
    • Mechanical Engineering
    • ECE
    • EEE
    • More Interview Questions
  • QUIZ (or) MCQ
    • S/W (or) Computer Scienc
    • Aeronautical & Aerospace
    • Civil Engineering
    • Mechanical Engineering
    • ECE
    • EEE
  • Tutorials
    • Artificial Intelligence(AI) Java AngularJS CSS
    • Internet of Things PHP Ajax CSS3
    • Python JavaScript HTML Basic Computers
    • C Language jQuery HTML5 SEO
  • Programs
    • C Language
    • C++ (or) CPP
    • Java
    • Python
    • Python
  • Govt Exams
    • Current Affairs MCQ
    • UPSC
      • UPSC Previous Questions
      • UPSC 2023
      • UPSC 2022
      • UPSC 2021
      • UPSC 2020
      • UPSC 2019
    • Monthly Current Affairs
    • Today GK
    • General Knowledge
    • Verbal Ability
    • Mental Ability
  • More
    • Examples
      • HTML
      • HTML5
      • CSS
      • CSS3
      • JavaScript
      • jQuery
      • AngularJS
    • References
      • Practice Templates
      • PHP Projects
      • Bootstrap 3 Plugins
      • Bootstrap 4 Plugins
    • Online Compailers
      • HTML
      • C & CPP
      • PHP
      • Python
    • Online Tools
      • Interest Calculator
      • EMI Calculator
      • Vehicle EMI Calculator
      • Color Picker
      • Image Compressor
    • Articles
      • Tech Articles
      • Articles
      • Blog
    • School Mathematics
      • Quadratic Equations
      • Prime Numbers
      • Factorial Numbers
      • Fibonacci Numbers
    • Marketing Management
    • IPC Sections
  • Contact
  1. Home
  2. Interview Questions
  3. CPP

How to use string in C++?

A string is a sequence of characters. In C++, string is a data type as well as a header file. This header file consists of powerful functions of string manipulation. A variable of string is declared as follows :
string str= "Hello"; 
 
And to use string one needs to include the header file.
// Include the string library
#include <string>
 
// Create a string variable
string str= "Hello";​
Top Trending Technologies Interview Questions
Machine Learning
Artificial Intelligence
IOT QUIZ
Blockchain
Deep Learning
Data Science
LLM
ChatGPT
Metaverse
DevOps
Cyber Security
Ethical Hacking
HyperAutomation
Microsoft Azure
AWS
Cloud Computing
Quantum Computing
Edge Computing
Cognitive Computing
RPA
5G Network
Checkpoint
Neural Networks
Virtual Reality
Augmented Reality
Full Stack Developer
Web Services
Angular
Node JS
React JS
C-Language
CPP (or) C++
More
Top Trending Technologies MCQ's
Machine Learning
Artificial Intelligence
IOT QUIZ
Blockchain
Deep Learning
Data Science
Keras
DevOps
Cyber Security
Ethical Hacking
Microsoft Azure
AWS
Cloud Computing
Quantum Computing
Edge Computing
ChatGPT
RPA
5G Network
Data Analytics
Neural Networks
Natural Language Processing
Networking
Virtual Reality
Augmented Reality
Angular
Node JS
React JS
C-Language
Java
More

  • Guest Post
  • About us
  • Privacy Policy
  • Terms & Conditions
  • Money Earning Tips
  • Contact Us

Follow Us

© 2017-2025. All Rights Reserved by Free Time Learning