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

C++ Language Updates

Ask a Question

Post a Lesson

All

All

Lessons

Discussion

Lesson Posted on 31 Oct IT Courses/Programming Languages/C++ Language/Basic C++

Creating a class in c++

Mahesh C

I have 20 years of experience in teaching C#, ASP.NET, C++ and C. Take pride in nurturing productive...

Introduction Before we proceed with understanding as to how to create a class in c++, we need to first understand the what is a class. Definition : A class is a container of related data and methods (functions). Example: StudentDetails Class Data Members : StudentName , StudentAge , ... read more

Introduction

Before we proceed with understanding as to how to create a class in c++, we need to first understand the what is a class.

Definition : A class is a container of related data and methods (functions).

Example

StudentDetails Class
Data Members : StudentName , StudentAge ,  StudentAddress
Methods : GetStudentData , SetStudentData

The above example shows a simple example as how we can group details of the students and the methods that will be used to access them.

Syntax for creating a class:

class name 

{

        Access Modifier:

                             Data members;

       Access Modifier:

                            Methods;

};

Access Modifiers can be:

private  Visible only inside the class.
protected Visible inside the class as well as derived (inherited) class.
public  Visible to every one.

Note : Normally data members will be either private or protected and methods will be public.

Example:

class StudentDetails{

            private:

                  int studentAge;

                  char studentName[20];

                  char studentAddress[50];

            public :

                 void SetStudentData(){

                             //you can write the logic for setting the data

                 }; 

                void GetStudentData(){

                           //you can write the logic for displaying the student data

               }

};

                           

 

 

read less
Comments
Dislike Bookmark

Lesson Posted on 20 Oct IT Courses/Programming Languages/C++ Language/Advanced C++

Predict the Output of C Questions based on Recursion and Macro

Yashvardhan Soni

I have done my BE(2004)and ME(2007) in Software Systems from BITS-PILANI. I am having 4 years of corporate...

#include<stdio.h>void k(unsigned int i,unsigned int j){ static char x="0123456789ABCDEF"; if(i>=j) k(i/j,j); putchar(x);}void main(){ k(20,12);} ___________________________________________ #include<stdio.h>int test(int a,int b){ if(a==b) return 1; else if(a>b)return 0; else... read more

#include<stdio.h>
void k(unsigned int i,unsigned int j){
static char x[]="0123456789ABCDEF";
if(i>=j) k(i/j,j);
putchar(x[i%j]);}
void main(){
k(20,12);} 

 

___________________________________________

 

#include<stdio.h>
int test(int a,int b){
if(a==b) return 1;
else if(a>b)return 0;
else return(a+test(a+1,b));
}
main(){
int x;
x=test(0,3);
printf("%d",x);} 

 

____________________________________________________________

 

#include<stdio.h>
main(){
int x(int,int);
printf("%d\n", x(1,1));}
int x(int m,int n){
if(m==0)return n+1;
if(m>=1&&n==0)
return x(m-1,1);
else
return x(m-1,x(m,n-1));} 

______________________________________________________________________


#include<stdio.h>
int f(char *p);
main()
{
char *p="hello";
f(p);
}
int f(char *p)
{
if(*p?f(++p):1)
printf("%c", *(--p));
return 1;
}

_________________________________________________________________
#include<stdio.h>
#define MAIN() main()
#define mAIN() Main()
int MaIn() {printf("Main ");}
int mAIN() {printf("main ");}
int MAIN() {printf("MAIN "); mAIN();}

___________________________________________________________

 

#include<stdio.h>
void foo(int n){
int m=1;
if(n){m++;
foo(n+1);}
m++;printf("m=%d, n=%d\n", m, n);
}

main(){
foo(-3);}
---------------------------------------------------------------------------------------------------------#include<stdio.h>
main(){
int For;
for(For=0;For<=6;For++)
for(For=0;For<=3;For++)
for(For=0;For<=5;For++)
printf("%d\n", For);
printf("%d\n", For);}

 

_________________________________________________________________
#include<stdio.h>
#define max(a,b) a>b?a:b
main(){
int m,n;
m=3+max(2,3);
n=2*max(3,2);
printf("%d %d", m, n);}

________________________________________________________________
#include<stdio.h>
int zap(int n){
if(n<=1)
return 1;
else
return(zap(n-3)+zap(n-1));}
main(){
printf("%d\n",zap(6));} 

_______________________________________________________________
#include<stdio.h>
#define ceil(x, y) (x+y-1)/y

main(){
int a,b,c;
b=1;c=1;
a=ceil(b&c, sizeof(int));
printf("%d \n", a);}
_________ _______________________________________________
#include<stdio.h>
void revs(char *c) {
if(*c!='\0'){
c++;revs(c++);
printf("%c",*c);}}
main(){
char c[10]="hello";
int n;
n=strlen(c);
revs(c);}
________________________________________________________________

read less
Comments
Dislike Bookmark

Answered on 11 Oct IT Courses/Programming Languages/C++ Language

Anand Prakash Sharma

Well there is no logic behind it. You learn by doing things.A Problem is nothing but a real life scenerio , So how will you solve a partiular problem in real life. You can apply that method to solve problem in programming.
Answers 7 Comments
Dislike Bookmark

Looking for C++ Language classes

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

FIND NOW

Lesson Posted on 22 Sep IT Courses/Programming Languages/C++ Language IT Courses/Programming Languages/C++ Language/Advanced C++ Tuition/BCA Tuition/Programming in C++

Definite book guides for C++

Siddharth

I am C++ Professional with industry experience of about 8+ years. I am well versed with C++ Basics and...

This post attempts to collect the few pearls among the dozens of bad C++ books. Unlike many other programming languages, which are often picked up on the go from tutorials found on the internet, only a few can quickly pick up C++ without studying a well written C++ book. Fact is, C++ is so big and complex,... read more

This post attempts to collect the few pearls among the dozens of bad C++ books.

Unlike many other programming languages, which are often picked up on the go from tutorials found on the internet, only a few can quickly pick up C++ without studying a well written C++ book. Fact is, C++ is so big and complex, that there are many horrible C++ books out there especially in Indian markets.

In this post, I would like to recommend some books which are a must read to become a C++ professional. Here goes my list

 

1) C++ Primer by Stanley Lippman, Josee Lajoie. (don't get confused with C++ Primer Plus) Must read for people with no programming experience.

2) A Tour of C++ by Bjarne Stroustrup. For people who are already familiar with C++ or say, experienced programmers in C++

3) Effective C++, Effective Modern C++ & Effective STL by Scott Meyers -- Best practices book, again for people with prior knowledge of C++

 

Above mentioned books will help anyone to understand and get some level of expertise in C++ with the right basics. Soon I will post a list of books for advanced programmers.

 

Hope this will end the search for good books on C++.

 

read less
Comments
Dislike Bookmark

Answered on 27 Sep IT Courses/Programming Languages/C++ Language

Ambika R.

Tutor

A function may or may not return a value to the calling function. If the function is returning a value, then you have to mention the data type in the function definition and funtion declaration (like int, float or double etc.). If the funtion not returning any value, then you have to mention the data... read more

A function may or may not return a value to the calling function. If the function is returning a value, then you have to mention the data type in the function definition and funtion declaration (like int, float or double etc.). If the funtion not returning any value, then you have to mention the data type as void. If you not mention return type, then compiler take it as int data type.

 Similary, a function  may have arguments or not. If your functions have arguments, then you have to mention data types of arguments. If you are not passing any arguemtns then you may write void or simply live it blank that is depend upon the compiler. main() is a user defined function, so it follows the same rules.

read less
Answers 12 Comments
Dislike Bookmark

Lesson Posted on 24 Jul IT Courses/Programming Languages IT Courses/Programming Languages/C++ Language/Advanced C++

C, C++, JAVA Tutor

Sumit Singh

I'm a proficient tutor in many programming languages C, C++, Java naming a few. I've been teaching 11th...

* Program to swap two numbers using a temporary variable with each statement explained with comments * #include // headerfile for cout statement using namespace std; // include standard library files int main() // main()- starting point of the... read more

* Program to swap two numbers using a temporary variable with each statement explained with comments *

 

#include                // headerfile for cout statement
using namespace std;              // include standard library files

int main()                        // main()- starting point of the program with int return type  
{                                 //  start of main()
    int a = 5, b = 10, temp;      // 3 variables where a,b are initialised and a temp variable 

    cout << "Before swapping." << endl;               // print statement
    cout << "a = " << a << ", b = " << b << endl;     // values before swapping

    temp = a;                     // assign a to temp
    a = b;                        // assign b to a
    b = temp;                     // final step in  swapping with assigning temp ,ie, a to b

    cout << "\nAfter swapping." << endl;              // print statement
    cout << "a = " << a << ", b = " << b << endl;     // values after swapping

    return 0;                     //return value required coz on int return type of main()
}                                 // termination of main()

// Semi-colon ';' is termination of each valid C++ statement

 

read less
Comments
Dislike Bookmark

Looking for C++ Language classes

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

FIND NOW

Answered on 22 Aug IT Courses/Programming Languages/C++ Language/Advanced C++ IT Courses/Programming Languages/C Language

Siva Naga

IT Professional Trainer

Switch is especially useful as check point for multiple conditions. Syntax: Switch(condition) { case 1: logic ;break; case 2 :logic; break; default : logic; } .switch statement checks condtion or choice and look for right case and execute the logic and then break the execution flow. if it did not... read more

Switch is especially useful as check point for multiple conditions.  Syntax: Switch(condition) {  case 1: logic ;break; case 2 :logic; break; default : logic; } .switch statement checks condtion or choice  and look for right case and execute the logic and then break the execution flow. if it did not find the any matched case , it will execute default  block.
ex: int day=1;
switch(day){
case 1:
          print("Monday");
           break;
case 2:
          print("Tuesday");
           break;
case 1:
          print("Wednesday");
           break;
case 1:
          print("Thursday");
           break;
case 1:
          print("Friday");
           break;
case 1:
          print("saturday");
           break;
Default:
          Print("Sunday");
}

read less
Answers 4 Comments
Dislike Bookmark

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

Compare C And C++ In Terms Of Header Files.

Suprio D.

Having training experience in dot-net Platform(3.5 LinQ,and wcf framework,webservices,MVC 4).. Applications),trained...

1."stdio.h" in c program controls input-output functionalities and operations associated with it where as in c++ program iostream.h" controls input-output functionalities and operations associated with it. 2."stdlib.h" in c program controls memory management like calloc ,malloc. where as "conio.h" in... read more

1."stdio.h" in c program controls input-output functionalities and operations associated with it where as in c++ program iostream.h" controls input-output functionalities and operations associated with it.

2."stdlib.h" in c program controls memory management like calloc ,malloc. where as "conio.h" in c++ program controls memory management like new and delete etc.

read less
Comments
Dislike Bookmark

Lesson Posted on 02 Jul IT Courses/Programming Languages/C++ Language/Advanced C++

How are C And C++ Different Form Each Other

Suprio D.

Having training experience in dot-net Platform(3.5 LinQ,and wcf framework,webservices,MVC 4).. Applications),trained...

1.C and C++ both have data types operator and conditional looping control statements. But the difference is that C++ has to object-oriented concepts which C programs do not have. Hence C program is like the subset of C++ program. 2. Hence C is a procedural programming language, and C++ is object-oriented... read more

1.C and C++ both have data types operator and conditional looping control statements.

But the difference is that C++ has to object-oriented concepts which C programs do not have. Hence C program is like the subset of C++ program.

2. Hence C is a procedural programming language, and C++ is object-oriented programing language.

2.C does not support functions, function overloading and operator overloading whereas C++ programs do.

3.C++ supports virtual and friend functions, whereas C has no support for virtual and friend functions.

4.C provides malloc() and calloc()functions for dynamic memory allocation, and free() for memory de-allocation, whereas C++ offers a new operator for memory allocation and delete operator for memory de-allocation.

5.C does not provide direct support for error handling (also called exception handling), C++ provides support for exception handling. Exceptions are used for "hard" errors that make the code incorrect.

6.C uses functions for input/output. For example, scanf and printf, whereas C++ uses objects for input-output. For example cin and cout.

7.C does not allow functions to be defined inside structures, whereas in C++, functions can be used inside a structure.

8.C does not support object-oriented programming; therefore it has no support for polymorphism, encapsulation, and inheritance, whereas, C++, being an object-oriented programming language, supports polymorphism, encapsulation, and inheritance.

read less
Comments
Dislike Bookmark

Looking for C++ Language classes

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

FIND NOW

Answered on 30 May IT Courses/Programming Languages/C++ Language/Basic C++

I preferred NCERT & R.d Sharma for Mathematics.I preferred S. Chand for Science & Follow the... read more

I preferred NCERT & R.d Sharma for Mathematics.
I preferred S. Chand for Science & Follow the NCERT question from NCERT.

read less

N. K Mishra

Tutor

Yes I can do this.
Answers 1 Comments 1
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 93

Lessons 63

Total Shares  

+ Follow 49,087 Followers

Top Contributors

Connect with Expert Tutors & Institutes for C++ Language

x

Ask a Question

Please enter your Question

Please select a Tag

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 25 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 6.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