What is a terminating character in c++?



What is a terminating character in c++?..

Answer / Anju Rani

In C++, the terminating character for strings (strings of characters, not wide characters) is the null character (''). It signals the end of a string and is automatically appended when you create or assign a value to a string.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ General Interview Questions

can any one help to find a specific string between html tags which is changed to a sting.. weather.html looks (for location) is <location>somewhere</location> #include <iostream> #include <fstream> #include <string> using namespace std; string find_field(string myPage,string); int main (void) { string page, line, location, temperature; ifstream inputFile("weather.xml"); while(getline(inputFile, line)) { page.append(line); line.erase(); } // Now page is a string that contains the whole xml page // Here you need to write something that finds and // extracts location and temperature from the XML // data in the string page and stores them in // the strings location and temperature respectively location=find_field(page,"location"); temperature=find_field(page,"temp_c"); cout << "Location: "<<location << endl; cout << "Temperature: " << temperature << endl; system("pause"); } string find_field(string myPage,string find_string){ int temp=myPage.find(find_string); if(temp!=string::npos) { cout << "Match found at " << temp << endl; } return "found?"; } ///

1 Answers  


What is the purpose of template?

1 Answers  


i want to know how to copy arrary without using any method or function. I have tried the below using System; class e4 { static void Main(string[] args) { int a,b; int[ ] m= new int[5]; int[ ] n= new int[5]; for(a=0;a<=4;a++) { Console.WriteLine("enter any value"); m[a]=Convert.ToInt32(Console.ReadLine()); m[a]=n[a]; } for(b=0;b<=4;b++) { Console.WriteLine(n[b]); } } } but it will give wrong result can anyone solve this problem

1 Answers   Reliance,


How can you force instantiation of a template?

1 Answers   ABC, Amazon,


Array base access faster or pointer base access is faster?

1 Answers  


What is basic if statement syntax?

1 Answers  


What are proxy objects?

2 Answers  


What is the use of :: operator in c++?

1 Answers  


Can notepad ++ run c++?

1 Answers  


True or false, if you keep incrementing a variable, it will become negative a) True b) False c) It depends

1 Answers  


What is the sequence of destruction of local objects?

1 Answers  


What is the difference between interpreters and compilers?

1 Answers  


Categories