Ads 468x60px

Sunday, 30 December 2012

Operators

Arithmetic Operators
Relational Operators
Logical Operators
Assignment Operators
Conditional Operators
Comma Operators


Arithmetic Operators
There are five types of operators
Addition ( + )
Subtraction ( - )
Multiplication ( * )
Division ( / )
Modulo Division ( % )

We are very familiar with the first four operators, they are simple mathematics and work same so explaining them is really not necessary, we need to know only about modulo division because this is what you may not familiar with.

Modulo Division
It will return the remainder.
e.g. 4%2 = 0
we can not use decimal value in it. Using decimal value will give an error.

Relational Operator
The operators which compares two values. There are six relational operators
Less Than ( < )
Greater Than ( > )
Less Than Equal to ( <=)
Greater Than Equal to ( >= )
Equal to Equal to ( = = )
Not Equal to ( !=)

The definitions are already clear from the names.

Logical Operators
Three type of logical operators:
AND (&&)
OR ( || )
NOT ( ! )

AND
If you are using this then every statement must be true for the execution of the next statement.
e.g.
a=10
b=10
if(a==10 && b == 10)
cout<<"true";

OR
For this operator any single statement must be true.
e.g.
a=10
if(a==10 || a==5)
cout<<"true";

NOT
In this statement any of the statements must not true.

Assignment Operators
Their 6 types of assignment operators used to assign values.
Equal to ( = )
e.g. a = 10

Plus Equal to ( + = )
e.g. a + = 10 (a = a+10)

Minus Equal to ( - = )
e.g. a - = 10 (a = a-10)

Multiply Equal to ( * = )
e.g. a * = 10 (a = a*10)

Divide Equal to ( / = )
e.g. a / = 10 (a = a /10)

Modulo Equal to ( % = )
e.g. a % = 10 (a = a%10)

Conditional Operators
The conditional expression can be used as shorthand for some if-else statements. It is a ternary operator. This operator consist of two symbols: the question mark (?) and the colon (:).

The general syntax of the conditional operator is:
Identifier = (test expression)? Expression1: Expression2 ;

e.g.

Instead of writing
if (x < y) 
{
min = x;
}
else
{
min = y;
}

You just say...
min = (x < y) ? x : y;

Comma Operator
A set of expression is separated by this operator ( , ). 
e.g. int i,j,k;

Data Types


The four fundamental data types are:
Character
Integer
float
Double


Character
char is a data type used for storing a single character. If we store an integer on this data type it will correspond to ASCII character (65 for letter A).
Syntax
char variable_name = value;
char takes one byte from memory.
Type Bytes Range
char 1 -127 to 127
unsigned char 1 0 to 255
signed char 1 -127 to 127
Integer
Integer is a datatype which stores a whole number (no fractional part), the number can be positive or negative.

Syntax

int variable_name = value;
Type Bytes Range
int 2 -32,767 to 32,767
unsigned int 2 0 to 65,535
signed int 2 -32,767 to 32,767
short int 2 -32,767 to 32,767
unsigned short int 2 0 to 65,535
signed short int 2 -32,767 to 32,767
long int 4 -2,147,483,647 to 2,147,483,647
signed long int 4 -2,147,483,647 to 2,147,483,647
unsigned long int 4 0 to 4,294,967,295
Float
Float stores number with decimal values. It takes 4 bytes of memory.

Syntax

float variable_name = value;

Double
Double can hold larger number with a high degree of precision. It takes 8 bytes of memory.

Saturday, 29 December 2012

Identifier, Keywords & Variables

2. Keywords
3. Variables

Identifier
The name given to program elements often to variables. The rules of giving name are:

  1. Characters (a-z, A-Z) and numbers (0-9) and underscore( _ ) can only be used. 
  2. An identifier must start from a character or underscore we can not start the name with numbers. 
  3. As we know that C++ is a case sensitive language so case is distinguishable i.e. ID and id can be used as separate identifiers. 
  4. We can not use a keyword as an identifier. 
Legal Identifiers
Variable_One
_variable2
this_is_your_identifier

Illegal Identifiers
1variable
:variable
this is your identifier

Keywords
These are standard identifier that are predefined in C++.
Rules of Keywords:

  1. Keywords can be only used for their defined purpose. 
  2. Keywords can't be used as an identifier. 
  3. Keywords can't be used as a variable name. 

Some common keywords are: void, long, else, do, goto, char, int etc.
Variables
Variable is the name given to a specific memory location to store some values, the size is depends on the type of the variable which is declared by the programmer.

The syntax of declaring a variable is
data_type variable_name = value

Rules of declaring variable

  1. All variable must be declared before its use in the program. 
  2. All declaration of the same data type can be separated by comma (,) and the declaration is terminated by semi colon (;) 
e.g.
int a,b,c;  
float x;
char z;

Your First Program

Now you installed the compiler on your computer. Open the compiler and type the following code.
#include<iostream.h>
#include<conio.h>

void main()
{
    clrscr();
    cout<<"Welcome to C++\n";
    getch();
}
After typing the above code press F9 to make your executable file of your program. 
Source Code 
After pressing F9 a dialogue box will open giving you the path of your executable fill with the message that your file is up to date. 

Now press Ctrl + F9 to run your program. You will see your output. You can press any key to exit from the output screen.
Output
Now you from the above code you can see that it is started with '#' (hash). In Programming Language we do not pronounce it as hash, it is called as a preprocessor directive after that include that simply means something is going to be included and then the angle bracket (<>) starts, in the angle bracket we have to write the name of the header file which we need to include in the program.

iostream stands for input output stream, conio stands for console input output and  .h is the extension of the header file.


void main()
This is the main function of your program. The syntax of writing a function is
<return type> <function name> <simple parenthesis>
void is the return type of function main, void means the function will return nothing.
main
Every program will have a main function. The program starts from main function and in an individual program only one main can possible.
()
Simple Parenthesis, it is the syntax of writing a function as said above.
{ 

}
Now, curly bracket starts means the body of the program starts. The whole program is written under the bracket.
clrscr();
Stands for clear screen. It clears the screen from all previous output and make fresh blank screen.
cout
Stands for console out, it is the output function which will give the output of the input and will print the messages on screen.
<<
Bitwise left shift operator it is the syntax of the command cout.
" "
In double quotes we have to write the message called string.
\n
Escape sequence used for inserting new line it will not appear in the output but it will give a new line to our output.
; (semi colon)
Statement terminator,  works as full stop in programming, every statement terminates with semi colon.
getch();
A function under the header file conio.h. It reads a character from the keyboard without displaying it. It is not  really necessary in the above program but we need to put this function to see the output screen. It will hold the output screen until we don't press a key from the keyboard.

C++ Compiler

What is a Compiler?
You are learning a Programming Language but the computer don't understand this language. You need a translator who will translate your program so that the computer can understand. We can say that the compiler is a translator. The compiler converts your source code to another computer language. Now we can define the compiler as:
A compiler is a computer program that transforms our source code written in programming language to the target language often as binary code or object code. 

There are a lots of compiler available in internet you can google it to download, but i personally recommend you to use Turbo C++. From the link given below you can download it for free. 


If you are having trouble with this compiler then you can choose from a lots of alternatives some is given below:

Friday, 21 December 2012

Lat Lag Gayee Race 2 Mp3 and Lyrics

Lat Lag Gayee Download Mp3 with Lyrics
Singer: Benny Dayal & Shalmali Kholgade
Music: Pritam
Lyrics: Mayur Puri
Movie: Race 2

(Right Click and Save Link As)


Lyrics of Song Lat Lag Gayee

beimaan... dil bada beimaan...

hota nahi asaan... ise hai samjhanaa...
beimaan... dil bada beimaan...
tere liye shaitaan... meri na ek maana...

dil jeete aa main jeetu...
dekhungi dekhega tu...
lo dil se sharat lag gayi...

mujhay to teri lat lag gayi lag gayi...
zamanaa kahe lat ye galat lag gayi...
mujhay to teri lat lag gayi lag gayi...
zamanaa kahe lat ye galat lag gayi...

mujhay to teri la a a a ye...
la a a a ye...
la a a a ye...
la a a a lat lag gayi...

mujhay to teri la a a a ye...
la a a a ye...
la a a a ye...
la a a a lat lag gayi...

roku jitna... utni bagawat ho...
lagta hai aisa haal dil ki... tum zaroorat ho...
roku jitna... utni bagawat ho...
lagta hai aisa haal dil ki... tum zaroorat ho...

mujhko bhi tu zaroori...
doobi nashe mein poori...
to kaisi ye talab lag gayi...

mujhay to teri lat lag gayi lag gayi...
zamanaa kahe lat ye galat lag gayi...
mujhay to teri lat lag gayi lag gayi...
zamanaa kahe lat ye galat lag gayi...

mujhay to teri la a a a ye...
la a a a ye...
la a a a ye...
la a a a lat lag gayi...

mujhay to teri la a a a ye...
la a a a ye...
la a a a ye...
la a a a lat lag gayi...

mujhay to teri...

ek tu ek main...
ek baat hui apni...
hairaan hai kyu saraa zahaan jo...
raat hui apni...

ek tu ek main...
ek baat hui apni...
hairaan hai kyu saraa zahaan jo...
raat hui apni...

mujhse tu aake mila...
to ye hua hai sila...
ke zada ho pat lag gayi...

mujhay to teri lat lag gayi lag gayi...
zamanaa kahe lat ye galat lag gayi...
mujhay to teri lat lag gayi lag gayi...
zamanaa kahe lat ye galat lag gayi...

mujhay to teri la a a a ye...
la a a a ye...
la a a a ye...
la a a a lat lag gayi...

mujhay to teri la a a a ye...
la a a a ye...
la a a a ye...
la a a a lat lag gayi...

mujhay to teri...

Thursday, 13 December 2012

Be Intehaan HD Music Video Featuring Atif Aslam

Download exclusive brand new and latest music of Atif Aslam from the movie Race 2. 
Download from the direct link given below.

Song Name: Be Intehaan
Artist: Atif Aslam and Sunidhi Chouhan
Composer: Pritam
Runtime: 2:15 min
Resolution: 1080p HD
Movie: Race 2
Featuring: Saif Ali Khan, Deepika Padukon and Atif Aslam

(Right click and save link as)

SCREENSHOTS







Friday, 7 December 2012

Be Intehaan: Atif Aslam Race 2 Mp3 and Lyrics

Download exclusive brand new and latest song of Atif Aslam from the movie Race 2. Download from the direct link given below.

Song Name: Be Intehaan
Artist: Atif Aslam and Sunidhi Chouhan
Composer: Pritam
Movie: Race 2

(Right click and Save link as)


Be Intehaan Lyrics


suno na...
kahein kya... suno na...
dil mera... suno na...
suno... zaraa...
teri baahon mein....mujhe rehna hai raat bhar...
teri baahon mein....hogi subah.....

Be Intehaan... Be Intehaan... Be Intehaan
Yoon Pyar Kar...
Be Intehaan...
Dekha karoon... Saari Umar... 
Tere Nishaan...
Be Intehaan...

Koi kasar naa rahe...
Meri khabar naa rahe...
Choo le mujhe is kadar...
Be Intehaan...

Jab saanso mein teri... saanse ghuli to...
fir sulagne lagein... 
ehsaas mere... mujhse kahne lage...

Haan baahon mein teri...
Aake jahaan do...
Yoon simatne lage...
Sailab jaise koi behne lage...

Khoya hoon main...
Aagosh mein....
Tu bhi kahaan...
Ab hosh mein...
Makhmali... Raat Ki...
Ho na subah....

Be Intehaan... Be Intehaan... Be Intehaan
Yoon Pyar Kar...
Be Intehaan...
Dekha karoon... Saari Umar... 
Tere Nishaan...
Be Intehaan...

Gustaakhiyaan...
Kuchh tum karo...
Kuchh hum kare is tarah....

Sharmaa ke do....
Saaye hain jo...
Mu fer le humse yahaan...

Choo to liya hai ye jism tunay...
Rooh bhi choom le...
Alfaaz bheege... bheege kyun hai mere...

Haan yoon choor hoke....
Mazboor hoke...
Qatra qatra kare....
Ehsaas bheege... bheege kyun hai mere...

Do bekhabar...
Bheege badan...
Ho besabar bheege badan...
Le rahe... Raat bhar... Angadaiyaan...

Be Intehaan... Be Intehaan... Be Intehaan
Yoon Pyar Kar...
Be Intehaan...
Dekha karoon... Saari Umar... 
Tere Nishaan...
Be Intehaan...

Koi kasar naa rahe...
Meri khabar naa rahe...
Choo le mujhe is kadar...
Be Intehaan...

Sunday, 2 December 2012

Download Six Famous Trojans

1. BEAST

2. BACK OFFICE

3. GIRL FRIEND

4. NETBUS

5. PRORAT

6. SUB SEVEN

Download all the six Trojans from the above given single link

Knowing The Trojans

Have you watched the movie Troy? The movie is about Trojan War, in that movie the Greeks constructed a Huge Wooden horse and pretended to sail away. The Trojans pulled the horse to their city as a trophy of victory. In that horse the Greek Army was hidden and at night the army opened the gates for the rest Greek Army and they destroyed the city of Troy and finished the war.

The same concept is applied in computer science
A Trojan is a malicious program  misguided as some very important  application. Trojans comes on the
backs of other programs and are installed on a system without the User’s knowledge. Trojans are 
malicious pieces of code used to install hacking software on a target system and aid the Hacker in gaining and retaining access to that system. Trojans and their counterparts are important pieces of the Hacker’s toolkit.

Trojans is a program that appears to perform a desirable and necessary function but that, because of hidden
and unauthorized code, performs functions unknown and unwanted by the user. These downloads are fake
programs which seems to be a legitimate application, it may be a software like monitoring program, system virus scanners, registry cleaners, computer system optimizers, or they may be applications like songs, pictures, screen savers, videos, etc.

You just need to execute that software or application, you will find the application running or you might
get an error, but once executed the Trojan will install itself in the system automatically. 

Once installed on a system, the program then has system-level access on the target system, where it can be
destructive and insidious. They can cause data theft and loss, and system crashes or slowdowns; they can also be used as launching points for other attacks

Many Trojans are used to manipulate files on the victim computer, manage processes, remotely run commands, intercept keystrokes, watch screen images, and restart or shut down infected hosts.


Different Types of Trojans

1. Remote Administration Trojans: There are Remote Access Trojans which are used to control the Victim’s computer remotely.

2. Data Stealing Trojans: Then there are Data Sending Trojans which compromised the data in the Victim’s computer, then find the data on the computer and send it to the attacker automatically.

3. Security Disabler Trojan: There are Security software disablers Trojans which are used to stop antivirus software running in the Victim’s computer.

In most of the cases the Trojan comes as a Remote Administration Tools which turns the Victim’s computer into a server which can controlled remotely. Once the Remote Access Trojan is installed in the system, the attacker can connect to that computer and can control it.