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


Please Help Members By Posting Answers For Below Questions

What is the full form of oops?

913


What is abstraction and encapsulation?

777


What is encapsulation in oop?

787


What do you mean by overloading?

796


What is protected in oop?

813


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.

6708


What is difference between multiple inheritance and multilevel inheritance?

880


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?

1818


Why is static class not inherited?

830


What is abstraction example?

835


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?

1622


Give two or more real cenario of virtual function and vertual object

2077


write a program that takes input in digits and display the result in words from 1 to 1000

2187


How is class defined?

830


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.

928