UrbanPro
true

Find the best tutors and institutes for C++ Language

Find Best C++ Language Classes

Please select a Category.

Please select a Locality.

No matching category found.

No matching Locality found.

Outside India?

Search for topics

Learn C++ Language with Free Lessons & Tips

Ask a Question

Post a Lesson

All

All

Lessons

Discussion

Lesson Posted on 09 Jul IT Courses/Programming Languages/C++ Language/Basic C++

My first C++ program

Juhi G.

I am B.E, Computer Science having 13 years of experience as Software professional and worked for MNS...

# include using namespace std; int main() { cout<<"Welcome to C++"; return 0; } Use IDE such as CodeBlocks to run this program. To do this, open CodeBlocks, Goto File->New->Empty File. Copy the above code and go to File->Save the file. Give a name and extension .cpp. About the... read more

# include

using namespace std;

int main()

{

cout<<"Welcome to C++";

return 0;

}

  1. Use IDE such as CodeBlocks to run this program. To do this, open CodeBlocks, Goto File->New->Empty File.
  2. Copy the above code and go to File->Save the file. Give a name and extension .cpp.
  3. About the program: Program execution ALWAYS starts from the main; this is a function. We will discuss more functions in later discussions; for now, consider it as a machine. You give some input; you get some output. Cout << is used to print any output messages or display any information. Remember to enclose messages in double-quotes.
  4. Dont forget to end lines with semicolons.
  5. Return 0 returns an integer value 0 for function main.In easy terms, it tells that everything worked fine.
  6. Functions always have opening and closing brackets.
  7. # include is a preprocessor directive telling the compiler to add header file iostream before including the rest of the program.IOSTREAM is an Input-Output stream. It allows you to use various objects related to I/O.
  8. Using name std. C++ has a standard library that contains common functionality you use in building your applications. The using namespace means that in the scope it is present, make all the things under the std namespace available without having to prefix std:: before each of them.
read less
Comments
Dislike Bookmark

Answered on 19/04/2020 IT Courses/Programming Languages/Python IT Courses/Programming Languages/C++ Language

Sejal

Yes absolutely
Answers 90 Comments
Dislike Bookmark

Answered on 15/11/2019 IT Courses/Programming Languages/C Language Tuition/BCA Tuition/C Language Programming IT Courses/Programming Languages/C++ Language/Advanced C++ +2 IT Courses/Programming Languages/C++ Language/Basic C++ IT Courses/Programming Languages/C++ Language less

Varnika Gautam

Btech grad with 7 yrs of C++ coding experience and multiple websites running on 1st page of google

The actual size to int is determined by the compiler as the program runs. But theoretically the size is 2 bytes. You can increase the size by adding keyword long infront of it to make the size 4 bytes. Eg int a; // 2 bytes Long int b; // 4 bytes
Answers 10 Comments
Dislike Bookmark

Looking for C++ Language Classes

Find best C++ Language Classes in your locality on UrbanPro.

FIND NOW

Answered on 03/05/2020 IT Courses/Programming Languages/C Language Tuition/BCA Tuition/C Language Programming IT Courses/Programming Languages/C++ Language/Advanced C++ +1 IT Courses/Programming Languages/C++ Language/Basic C++ less

Manjunath B

I Can teach Programming Languages also

Of course, C language is only the heart of any processor or controller.Because of complexity in C peoples are looking to work on High-level languages like JAVA etc.
Answers 7 Comments 1
Dislike Bookmark

Answered on 28/12/2018 IT Courses/Programming Languages/C Language Tuition/BCA Tuition/C Language Programming IT Courses/Programming Languages/C++ Language/Advanced C++ +1 IT Courses/Programming Languages/C++ Language/Basic C++ less

Narendra

Computer Science Tutor

yes. C++ is generally used to write system software. For example windows operating system are writeen in C++. Most of the operating system, device driver and antivirus programs are written by using C++.
Answers 6 Comments
Dislike Bookmark

Answered on 08/11/2020 IT Courses/Programming Languages/C Language Tuition/BCA Tuition/C Language Programming IT Courses/Programming Languages/C++ Language/Advanced C++ +2 IT Courses/Programming Languages/C++ Language/Basic C++ IT Courses/Programming Languages/C++ Language less

Vidya

Yes, "C" is a sea, with C, you write high-level programs, assembly level using #Pragma & handle peripheral devices directly, With curses & 'C' you can play with "C and implement a graphical user interface for Linux", and the more :) you play with ASCII and Colour background in MS-DOS environment.... read more

Yes, "C" is a sea, with C, you write high-level programs, assembly level using #Pragma & handle peripheral devices directly, With curses & 'C' you can play with "C and implement a graphical user interface for Linux", and the more  :) you play with ASCII and Colour background in MS-DOS environment. Even much more 'C' language can do. I know this much.

read less
Answers 4 Comments
Dislike Bookmark

Answered on 22/01/2019 IT Courses/Programming Languages/C Language Tuition/BCA Tuition/C Language Programming IT Courses/Programming Languages/C++ Language/Advanced C++ +2 IT Courses/Programming Languages/C++ Language/Basic C++ IT Courses/Programming Languages/C++ Language less

Amaninder Kaur

Trainer

Not at all because Python is very easy and beautiful language for programming. It reduces length of code and also minimize development time of project as compare to other languages.
Answers 4 Comments 1
Dislike Bookmark

Answered on 24/01/2019 IT Courses/Programming Languages/C Language Tuition/BCA Tuition/C Language Programming IT Courses/Programming Languages/C++ Language/Advanced C++ +2 IT Courses/Programming Languages/C++ Language/Basic C++ IT Courses/Programming Languages/C++ Language less

Srikanth Puli

C++ Tutor; Make it easy.

Using recursion; #include<iostream> void printNTimes(int nTimes){ if(nTimes <= 0) return; std::cout<<"I love programming "; printNTimes(--nTimes);} int main(){ int n = 0; std::cin>>n; printNTimes(n);} read more

Using recursion;

#include<iostream>

void printNTimes(int nTimes)
{
if(nTimes <= 0)
return;
std::cout<<"I love programming ";
printNTimes(--nTimes);
}

int main()
{
int n = 0;
std::cin>>n;
printNTimes(n);
}

read less
Answers 3 Comments
Dislike Bookmark

Answered on 05/11/2020 IT Courses/Programming Languages/C Language Tuition/BCA Tuition/C Language Programming IT Courses/Programming Languages/C++ Language/Advanced C++ +1 IT Courses/Programming Languages/C++ Language/Basic C++ less

Ashish K.

Electrical Engineer from IIT Kanpur ,By profession Software Engineer and Teacher by passion

These rules are instrumental when you design your class. When you create/write a new class, you always think of 5 place holder methods in it. Earlier it was three, but after C++ 11 it became 5. They are: Constructor Copy Constructor Assignment operator; After C++11 - Move Copy constructor Move Assignment... read more

These rules are instrumental when you design your class.

When you create/write a new class, you always think of 5 place holder methods in it.

Earlier it was three, but after C++ 11 it became 5.

They are: 

  1. Constructor 
  2. Copy Constructor
  3. Assignment operator; After C++11 - 
  4. Move Copy constructor 
  5. Move Assignment operator.
  • Rule of 0 means, your class is designed in a way, such that you don't need any of 1,2,3,4,5
  • Rule of 3 means, you need 1,2,3
  • Rule 3 of 5 means, you need all 1,2,3,4,5

Best case is to design a class so that you have a rule of 0. But it's not always possible.

It will depend on the nature of your class members. It's bad practice to have them as raw pointers because then you have to write these constructors carefully and also think about resource leakage. Sometimes, we make them shared pointer or unique pointer etc. to reduce our work of writing these constructors and methods. If your class members are themselves following the rule of 0,3,5 etc., then it will also affect your decision whether you have to give all 5 or 0 or 3.

In a nutshell, it's always a good practice to think about these five methods, whenever you write a new class. 

Good question!!

read less
Answers 1 Comments
Dislike Bookmark

Looking for C++ Language Classes

Find best C++ Language Classes in your locality on UrbanPro.

FIND NOW

Answered on 29/01/2015 IT Courses/Programming Languages/C++ Language

Manoj Kumar Vishwakarma

DBA Trainer

On the basis of his total experience and Qualification you can do it.
Answers 35 Comments
Dislike Bookmark

About UrbanPro

UrbanPro.com helps you to connect with the best C++ Language Classes in India. Post Your Requirement today and get connected.

Overview

Questions 549

Lessons 66

Total Shares  

+ Follow 67,870 Followers

Related Topics

Top Contributors

Connect with Expert Tutors & Institutes for C++ Language

x

Ask a Question

Please enter your Question

Please select a Tag

X

Looking for C++ Language Classes?

Find best tutors for C++ Language Classes by posting a requirement.

  • Post a learning requirement
  • Get customized responses
  • Compare and select the best

Looking for C++ Language Classes?

Find best C++ Language Classes in your locality on UrbanPro

Post your learning requirement

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more