0% found this document useful (0 votes)
4 views

ICT LAB Functions

Uploaded by

saaddaula1
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

ICT LAB Functions

Uploaded by

saaddaula1
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

ICT LAB

Dated: 30-12-24

Task1:Find out the size of the different data types.

Task 2: How to create a variable of type integer.

Whats the output?


Ans:
Task 3: Variable of the Type Character

Whats the Output?


Ans:

1. Write a program in C++ to print a welcome text in a separate line.

2. Write a program in C++ to print the sum of two numbers.


Sample Output:

Print the sum of two numbers :


-----------------------------------
The sum of 29 and 30 is : 59

3. Write a program in C++ to find Size of fundamental data types.


Sample Output:
Find Size of fundamental data types :
------------------------------------------
The sizeof(char) is : 1 bytes
The sizeof(short) is : 2 bytes
The sizeof(int) is : 4 bytes
The sizeof(long) is : 8 bytes
The sizeof(long long) is : 8 bytes
The sizeof(float) is : 4 bytes
The sizeof(double) is : 8 bytes
The sizeof(long double) is : 16 bytes
The sizeof(bool) is : 1 bytes

4. Write a program in C++ to print the sum of two numbers using


variables.
Print the sum of two numbers :
-----------------------------------
The sum of 29 and 30 is : 59

You might also like