Assignment 1
Assignment 1
1. Write a C program to accept 2 numbers, add the two and display the sum.
2. Write a C program to accept a number and display if it odd or even.
3. Write a C program to Accept two numbers and an arithmetic operator.
Depending on the operator do the calculation and display the sum.
4. C program to display the sum of the even numbers from 1 to 10 using while loop.
5. C program to display the product of odd numbers from 1 to 10 using for loop.
6. C program to display the GCD of two numbers.
7. C program to display the LCM of two numbers
8. Write a C program to accept two numbers, pass them to a function where you
add the two numbers and display the sum in the main function.
9. Write a C program to display pyramid of stars
should be displayed as
You Are How Hello
Interview Questions
16. What is Object Oriented Programming (OOPs)?
17. What is a Class?
18. What is an Object?
19. What is Encapsulation?
20. What is Abstraction?
21. What is Polymorphism?
22. What is Compile-Time Polymorphism
23. What is Runtime Polymorphism
24. What is Inheritance? What is its purpose?