Assignment 01
Assignment 01
(PLO1, CL01)
Lahore Garrison University
Department of Computer Sciences
Assignment No 1
Q1. Demonstrate and print the first three characters of their name on separate lines in C++. (5)
#include <iostream>
int main()
{
\* Comments *
std::cout<<"Hello world";
return 0; }
a. cout << "x = " << x << ", y = " << y << ", z = " << z << endl;
c. cout << "Product of " << x << " and " << z << " is " << x * z << endl;
Q4. Determine and describe the output of the given statements, with a being an int variable initialized to 25, b being an int
variable initialized to 20, and c being a double variable initialized to 5.0. (7)