Tuesday, 3 April 2018

Pointers and Functions

1. Pointers are very much used in function and declaration. 2. Sometimes with the use of pointer , a complex function can be easily represented and accessed. 3. The use of pointers in a function definition may be classified into two groups.      Call by Value      Call by Reference Call By Value:-  1.In a call...

Pointers

A pointer is a variable which holds the memory address of another variable. Advantage of pointer :  1. It supports dynamic allocation and de allocation of memory segments.  2. It allows creation of data structure such as linked list, stacks, queues, trees and graphs.  3. With the help of pointer , variable can be swapped without physically...

Monday, 2 April 2018

Union

Unions like structure contain members whose individual data types may differ from one another. However the members that compose a union all share the same storage area within the computers memory where as each member within a structure is assigned its own unique storage area. Thus unions are used to observe memory. They are useful for application...

Structure

Arrays are used to store large set of data and manipulate them but the disadvantage is that all the elements stored in an array are to be of the same data type. If we need to use a collection of different data type items it is not possible using an array. When we require using a collection of different data item of different data types we can use...

Sunday, 1 April 2018

The case Control Structure

Switch Statement  The switch statement cause a particular group of statements to be chosen from several available groups. The selection is based upon the current value of an expression that is include within the switch statement. The form of switch statement is  switch (integer expression)  {   case constant 1:   do this;  ...

The Break and Continue Statement

The Break Statement :-    The keyword break allows us to jump out of a loop instantly without waiting to get back to the conditional test. When the keyword break is encountered inside any C loop, automatically passes to the first statement after the loop. For e.g. the following program is to determine whether a number is prime or not  Logic...

Loop Control Structures

These are three methods by way of which we can repeat a part of a program in C programming. 1. Using a for Statement 2. Using a while Statement 3. Using a do-while Statement The While Loop (pre-test Loop)    The general form of while is as shown below :      initialize loop counter ;      while (test...

Control Structure in C

The decision control structure in C can be implemented using  1. The if Statement   2. The if - else Statement  3. The Nested if - else Statement The if Statement   The general form of it statement looks like this :          if(this condition is true)            ...

Saturday, 31 March 2018

Variables

A variable is a value that can change any time. It is a memory location used to store a data value. A variable name should be care fully chosen by the programmer so that it use is reflected in a useful way in entire program. Variable names are case sensitive. Example of variable names are   sun   Number   Salary   Emp_name  ...

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 :  ...

Popular Posts

Categories

100 Python Programs for Beginner (98) AI (39) Android (24) AngularJS (1) Api (2) Assembly Language (2) aws (17) Azure (7) BI (10) book (4) Books (197) 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 (1048) Python Coding Challenge (456) Python Quiz (123) 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)