Skip to main content

Posts

Showing posts from September 7, 2016

Dev c++ 3rd class

For more discuss and ask question join this group   https://www.facebook.com/groups/143792885956764/ Solved   By : Tahir Siddiqui(Mani) BC-140201235@Vu.edu.pk Dev c++ 3rd  lecture : Today Topic :Increment/decrements operators, and side effects : Incrementing (adding 1 to) and decrementing (subtracting 1 from) a variable are so common that they have their own operators in C. There are actually two versions of each operator -- a prefix version and a postfix version. Operator Symbol Form Operation Prefix increment (pre-increment) ++ ++x Increment x, then evaluate x Prefix decrement (pre-decrement) –– ––x Decrement x, then evaluate x Postfix increment (post-increment) ++ x++ Evaluate x, then increment x Postfix decrement (post-decrement) –– x–– Evaluate x, then decrement x for Example : int x = 5 ; int y = ++ x ;     // x is now equal to 6, and 6 is assigned to y int x = 5 ; int y = x ++ ;        //

Dev c++ 3rd class

For more discuss and ask question join this group   https://www.facebook.com/groups/143792885956764/ Solved   By : Tahir Siddiqui(Mani) BC-140201235@Vu.edu.pk Dev c++ 3rd  lecture : Today Topic :Increment/decrements operators, and side effects : Incrementing (adding 1 to) and decrementing (subtracting 1 from) a variable are so common that they have their own operators in C. There are actually two versions of each operator -- a prefix version and a postfix version. Operator Symbol Form Operation Prefix increment (pre-increment) ++ ++x Increment x, then evaluate x Prefix decrement (pre-decrement) –– ––x Decrement x, then evaluate x Postfix increment (post-increment) ++ x++ Evaluate x, then increment x Postfix decrement (post-decrement) –– x–– Evaluate x, then decrement x for Example : int x = 5 ; int y = ++ x ;     // x is now equal to 6, and 6 is assigned to y int x = 5 ; int y = x ++ ;        //

Dev c++ 2nd class

For more discuss and ask question join this group   https://www.facebook.com/groups/143792885956764/ Solved   By : Tahir Siddiqui(Mani) BC-140201235@Vu.edu.pk Dev c++ 2nd  lecture : Structure of a program : A computer program is a sequence of instructions that tell the computer what to do.   Statements and expressions The most common type of instruction in a program is the statement . A statement in C++ is the smallest independent unit in the language. In human language, it is analogous to a sentence. We write sentences in order to convey an idea. In C++, we write statements in order to convey to the compiler that we want to perform a task. Statements in C++ are terminated by a semicolon . There are many different kinds of statements in C++. The following are some of the most common types of simple statements: int x; x=5; x=y;   int x is a declaration statement . It tells the compiler that x is a variable. In programming, a variable pro