basic programming and computer science topic description and discussion for students
bandicam 2017 01 23 20 38 45 832
Get link
Facebook
X
Pinterest
Email
Other Apps
This is just for your Knowledge.Those who want to start with java can find this Helpful.
Get link
Facebook
X
Pinterest
Email
Other Apps
Comments
Popular posts from this blog
Hello Everyone. Now Lets Talk about the very useful if-else statements. It is a very simple type of Selective Statement but is of great Use. A If statement is Generally used to Compare Standard Data Types like integer,char ,double,etc. which is put inside parenthesis, whose result is given in either true or false,or 0 or 1, and is then checked by the compiler, if it is true ,the statements following this if statement will execute ,Otherwise it will not execute if statement block and execute the else block if present. An else block is a Block that executes in case if statement is not satisfied. Now Coming to the example.It will be more clear when you see the Example. int n=5; if(n>2) { n++; n = 2*n; } else{ n--; n=2*n; } Here, We have Declared a integer type variable n with value 5. Then there is an if statement with test expression = n>2 . Since, n=5 ,i.e., n>2 , Therefore, this condition is true and satisfied. Therefore , if statement block will execu...
Hello everyone.Now we will discuss the relational operators. Relational Operators are generally used to define a test expression or a test condition.These are > , < , >= , <= , == , != . Note that == operator is used to check equality whereas = operator is used for assignment.There are also logical operators such as !,&& and || to negate a condition or to combine two conditions. A comma operators is used to combine several expressions together which get executed from left to right.It works as a punctuator. Ternery Operator/Conditional Operator-It is the replacement of simple Conditional operator.Its Syntax is as follows:- (condition)?True:False; Now coming to the Datatype conversions.These are of two types:- 1.Implicit 2.Explicit Implicit-In Implicit type conversion the compiler converts one data type to another automatically and it actually converts all the data upto the type of largest operand available in the expression & that is why implicit...
Hi! Today we will discuss Data type modifiers and Unary operators. Data type Modifiers- There are basically 4 datatype modifiers in C++-Signed,Unsigned,lond and short. As the name suggests, it modifies the basic datatypes and change their meaning to fit them in various situations precisely.All data types can be modified using datatype modifiers except void.For eg- unsigned int a;(It can store of positive integer which are not in range with normal integer datatype). The opposite is the function of signed int. Now long and short datatype modifiers change the amount of memory space given to a particular variable of that data type. for eg- long int will be given 4 bytes space in memory whereas int is of 2 bytes(in turbo c++). We can use these datatypes to make our program more precise which you will experience with time. There are Unary operators like -,++,-- in c++; ++ or -- operators are used to increment or decrement the value stored in a variable by one.These can be used be...
Comments
Post a Comment