0% found this document useful (0 votes)
21 views2 pages

Int True

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views2 pages

Int True

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

C++ : Compiled or Interpreted

C++ is designed to be compiled language. This means that it is generally translated into machine
language that can directly understood by the system, generating the program highly efficient. A set of
tools were needed, known as the development toolchain ,whose core are compiler and its linker.

Variables in C++:

#include<iostream>

#include<string>

int main() {

// declaring variables

int myNum=5

bool myBoolean =true

float decimal- 5.99

char myLetter = ‘D’

String myText = “Hello”

// printing the values of the variables

cout<< “num = “<< num << endl;

cout<< “isTrue= “<<isTrue<< endl;

cout<< “decimal= “<< decimal<<endl;

cout <<”myLetter= << myLetter<< endl;

return 0;

Swapping 2 variables :

int main () {

int a,b, temp;

cout<< “nPlease Enter the First Number : a= “;cin >>a;

cout << “nPlease Enter the Second Number : b= “;cin>> b;


cout << “nThe Value Before Swapping: a = “<< a << “ and b= “ << b; temp=a;

b temp;

cout<< “nThe Result after Swapping : a = “<< a << “ and b “<<b<end;

Return 0;

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy