Академический Документы
Профессиональный Документы
Культура Документы
Tasks
3. char c=’A’;
cout<<“Character” << c;
5.#include<conio.h>
Task # 2 Write a C++ program in which declare some variables with valid
identifiers and conventions rule, to hold your name, your total marks in
previous semester, percentage, your grade, your status of pass or fail etc,
assign them explicitly and print them. Try to declare variables of all data
types and assign the appropriate values.
Student Name
a house number,
a street,
a city,
a state and a
postal code.
Supply values at runtime: and print the address with the street on one line
and the city, state, and postal code on the next line.
Task # 5 Write a C++ program to print the ascii value of a given character.
Expected Output
The ASCII value of Z is :90
Task # 6 Write a class that prints out the \n character on the screen.
Expected output
Number: 50.25
Integer part: 50
Fractional part: 0.25
Task # 12 Write a c++ program, which takes three int values from the user, and print their addition
and average.
Task # 13: In the following program, explain why the value "6" is printed
twice in a row:
// PrePostDemo.cpp
int main() {
int i = 3;
i++;
cout<<i; // "4"
++i;
cout<<i; // "5"
cout<<++i; // "6"
cout<<i++; // "6"
out<<i; // "7"
}