- Lecture: 1 Homework Solutions
- Lecture: 2 Homework Solutions
- Lecture: 3 Homework Solutions
- Lecture: 4 Homework Solutions
- Lecture: 5 Homework Solutions
- Lecture: 6 Homework Solutions
- Lecture: 7 Homework Solutions
Search This Blog
Showing posts with label Love Babbar. Show all posts
Showing posts with label Love Babbar. Show all posts
Love Babbar's C++ DSA Lecture's Solutions
Homework of Video 3 ( If-Else, While loop & Lots of Patterns (Part-1) ) - Love babbar
1. Why do we write namespace std & iostream as the program's header?
Ans. These are pre-built libraries where a code related to performing a certain task is placed So that, C++ can work effectively.
a. Using namespace std: There are a bunch of namespaces & out of them we are using std that makes the computer know that we are using cout. Basically, an identifier conflict resolver.
b. #include <iostream> : This header contains the programs of input & output functions like cout,cin etc. #include asks to include iostream
2. Guess the output :
Ans: NINEYPOSITIVE
Ans: 3
Ans: Love24
3. Write a code that accepts char ch.
- Prints this is the lowercase or small case if lies in between 'a' - 'z'
- Prints this is uppercase if lies in between 'A' - 'Z'
- Prints this is numeric if lies in between '0' - '9'
4. Input N and print the sum of all the even numbers lying in 1 to N.
5. Write a program to convert the temperature into:
- Fahrenheit to celsius
- Celsius to Fahrenheit
Subscribe to:
Posts (Atom)
-
Hashing to Solutions: Two Sum Longest Substring Without Repeating Characters Longest Palindromic Substring Container With Mos...
-
Hey! Here, am on Day 02 of Angela's course. Though my heading says Day 04 which is actually done to stay in order of all the python le...
-
Exploring Data Types TechGig The question asked to check out the data type of the user input. It was quite tricky as python by default conve...