Combined Notes Till 7th April 2023

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 418

Homework Solutions (28th January 2023)

Q1. What is the difference between compiler and interpreter?


Ans1.

Q2. What is ASCII Table?


Ans2.
Q3. What is the difference between 32-bit and 64-bit CPU?

Q4. Explore various naming conventions of naming a variable.

Q5. Explore the associativity and precedence table.


29th January 2023 (Homework Solutions)
Q1. What will happen if we use cin inside the if as a condition?
Ans1.

Q2. What will happen if we use cout inside the if as a condition?


Q3. Write a code to make Full Pyramid Pattern.
Ans3.
Stars will be printed the
same way as was done in the
half pyramid pattern.

Q4. Write a code to make Inverted Full Pyramid Pattern.


1st February 2023
Q1. Is C a high level, middle level or low-level language? Explain.
Ans1.

Q2. What are reserved keywords in C++?


Q3. As we know that short takes 2 bytes of memory which is equivalent to 16 bits and the maximum
number it can store is 2^16 – 1 which is equal to 65535 but what happens if we add 65535 and it
becomes 65545 and then stored in short? What will be the output?

Q4. Explore ternary operator in C++.

You might also like