Saturday, 31 March 2018

Constants

A constant value is the one which does not change during the execution of a program. C supports several types of constants.  1. Integer constants  2. Real constants  3. Single character constant  4. String constants Integer Constants  An integer constant is a sequence of digits. There are 3 types of integers namely decimal...

Friend Function

The private member function can not be accessed from outside the class. The non Member function can not access private data. Sometimes there can be situation where we would like two classes to share a particular function. In such a case, c++ allows the common function to be made friendly with both classes and so allows the function to have access...

Functions returning Objects

A function can not only receive the objects as argument but also returns objects from function. Ex: #include<iostream.h> #include<conio.h> class complex { float x; float y; public: void input(float real,float img) { x=real; y=img; } friend complex sum(complex, complex); void show(complex); }; complex sum(complex c1, complex c2) { complex...

Object as Function Argument

An object can be used as a function argument.This can be done in two ways  1. Pass by value  2. Pass by reference Pass by value :   In pass by value, a copy of entire object is passed to the function so any change made to the object inside the function do not affect the object used to call the function. Pass by reference :  ...

Static Member Function

Member function may also be declared static by prefixing the static keyword in the function definition header. A static member function can have access to only other static members declared in the same class. A static member function can be called by using its class name.   class_name::function_name( ); A static member function can not be...

Program Documentation

What is Documentation ?    Documentation consists of instructions for using a computer device of program.    Documentation can appear in a variety of forms, the most common being manuals.    When you buy a computer product (hardware or software), it almost always comes with one or more manuals that describe how to install...

Friday, 30 March 2018

Static Data Members

To create a static data member only you have to proceed a member variables declaration with static keyword. All static variables are automatically to zero value , when the first object of the class is created. No other initialization is permitted. Only one copy of static data member is created for the entire class and is shared by the objects of...

Destructor

A destructor is a special member function which is used to destroy the objects which has been created by constructor. Name of the constructor is same as the class name. Destructor is preceded by tilde symbol(~) Ex. For the class Integer , Destructor is    ~Integer( )       {            ...

Constructor with default arguments

It is possible to define constructor with default arguments. Default argument must be trailing arguments. Default argument of the constructor can be overrides by sending the values from calling function. Let consider        Complex(float real, float imag=0);   The Default value of the argument imag is zero. The...

Constructor Overloading

Cpp permits to use the constructor like default, copy or parameterized constructor in the same class. Constructor overloading means using multiple constructor in the class having different no og arguments and different types of argument. Ex: class abc { int m,n; public: abc( ) {  m=0;  n=0; } abc(int a, int b)  {   m=1;  ...

Access Control In Classes OR Access Modifiers

Access specifiers in C++ class defines the access control rules. C++ has 3 new keywords introduced, namely, 1. public 2. private 3. protected These access specifiers are used to set boundaries for availability of members of class be it data members of  members or member functions Access specifiers in the program, are followed by a colon. You...

Thursday, 29 March 2018

Concept of API / Libraries

Application Programming Interface (API) is an interface in computer science that defines the ways by which an application program may request services from libraries and/ or operating system.It is a set of routines, protocols and tool for building software applications.    A good API makes it easier to develop a program by providing all...

Debugging a Program for Syntax Errors and Logical Errors

Debugging a Program for Syntax Errors As compared to logical errors, syntax errors are much easier to locate and correct because almost all language processor are designed to detect syntax errors automatically. A single syntax error often cause multiple error messages to be generated by the language processor. Removal of the syntax error will result...

Testing a Program

For most programs, it is practically impossible to prove that the program is correct on all inputs.Instead, you must try to convince skeptics that it mostly works right, by testing the program on various inputs and documenting what you have done. This documentation is called a test plan and you must provide one with each program. The test plan describes...

Popular Posts

Categories

100 Python Programs for Beginner (98) AI (40) Android (24) AngularJS (1) Api (2) Assembly Language (2) aws (17) Azure (7) BI (10) book (4) Books (198) C (77) C# (12) C++ (83) Course (67) Coursera (251) Cybersecurity (25) Data Analysis (3) Data Analytics (3) data management (11) Data Science (149) Data Strucures (8) Deep Learning (21) Django (16) Downloads (3) edx (2) Engineering (14) Euron (29) Events (6) Excel (13) Factorial (1) Finance (6) flask (3) flutter (1) FPL (17) Generative AI (11) Google (36) Hadoop (3) HTML Quiz (1) HTML&CSS (47) IBM (30) IoT (1) IS (25) Java (93) Java quiz (1) Leet Code (4) Machine Learning (85) Meta (22) MICHIGAN (5) microsoft (4) Nvidia (4) Pandas (4) PHP (20) Projects (29) pyth (1) Python (1052) Python Coding Challenge (459) Python Quiz (127) Python Tips (5) Questions (2) R (70) React (6) Scripting (3) security (3) Selenium Webdriver (4) Software (17) SQL (42) UX Research (1) web application (8) Web development (4) web scraping (2)

Followers

Python Coding for Kids ( Free Demo for Everyone)