/Programming-in-CPP-NPTEL

This repository contains the solutions of all the programming and quiz assignments of Programming in C++ NPTEL course by By Prof. Partha Pratim Das, IIT Kharagpur

Primary LanguageC++The UnlicenseUnlicense

Programming-in-C++

This repository contains the solutions of all the programming and quiz assignments of Programming in C++ NPTEL course by By Prof. Partha Pratim Das, IIT Kharagpur

WEEK 1:

  • Programming in C++ - Week 1 Quiz

  • C++ Week 1:Q1 Consider the following code snippet. Fill in the blank at LINE-1 to create a stack and at LINE-2 to fill the stack with the value of array str.

  • C++ Week 1:Q2 Consider the following program and fill the blank at LINE-1 to check if s1 is not greater than s2. Look at the the sample input and output to understand the comparison operation and write proper return statements at LINE-2 and LINE-3.

  • C++ Week 1:Q3 Consider the following program and fill in the blanks at LINE-1 to define a function pointer type Fun_Ptr such that it can be used to create a pointer to point add() function. At LINE-2 create function pointer fp to point to function add()

WEEK 2:

  • Programming in C++ - Week 2 Quiz

  • C++ Week 2:Q1 To call the method print() of class Student first and then call print() method of class School.

  • C++ Week 2:Q2 To call the method print() of class given class Printer to print the following:

           --------------------------------
            Hi! I am class STUDENT
            Hi! I class SCHOOL.
           --------------------------------
    
  • C++ Week 2:Q3 To call print() method of class Question by creating a method named ‘studentMethod()’.

  • C++ Week 2:Q4 To call default constructor first and then any other constructor in the class.

  • C++ Week 2:Q5 To debug / complete the program which is intended to print 'NPTEL JAVA'.