WAP to generate 2n+1 lines of the following pattern on the
computer screen:
Answer Posted / tejaswini dhatrak
#include<stdio.h>
#include<conio.h>
int main()
{
printf(“*”);
for(int i=1;i<=5;i++)
{
printf(“**”);
}
printf(“*”);
return 0;
}
Is This Answer Correct ? | 1 Yes | 2 No |
Post New Answer View All Answers
What is the full form of oops?
What is abstraction and encapsulation?
What is encapsulation in oop?
What do you mean by overloading?
What is protected in oop?
just right the logic of it 1--> If few people are electing then every time ur candidate should win 2--> arrange books in box, if box carry weight == books weight then take another box..... find the no of box required.
What is difference between multiple inheritance and multilevel inheritance?
IS IT NECESSARY TO INITIALIZE VARIABLE? WHAT IF THE INSTANCE VARIABLE IS DECLARED final ? IS IT NECESSARY TO INITIALIZE THE final VARIABLE AT THE TIME OF THEIR DECLARATION?
Why is static class not inherited?
What is abstraction example?
They started with the brief introduction followed by few basic C++ questions on polumorphism, inheritance and then virtual functions. What is polymorphims? How you will access polymorphic functions in C? How virtual function mechanism works?
Give two or more real cenario of virtual function and vertual object
write a program that takes input in digits and display the result in words from 1 to 1000
How is class defined?
Question: Implement a base class Appointment and derived classes Onetime, Daily, Weekly, and Monthly. An appointment has a description (for example, “see the dentist”) and a date and time. Write a virtual function occurs_on(int year, int month, int day) that checks whether the appointment occurs on that date. For example, for a monthly appointment, you must check whether the day of the month matches. Then fill a vector of Appointment* with a mixture of appointments. Have the user enter a date and print out all appointments that happen on that date.