WAP to generate 2n+1 lines of the following pattern on the
computer screen:

Answers were Sorted based on User's Feedback



WAP to generate 2n+1 lines of the following pattern on the computer screen:..

Answer / krishnan

*
* *
* *
* *
* *
* *
*

Is This Answer Correct ?    1 Yes 2 No

WAP to generate 2n+1 lines of the following pattern on the computer screen:..

Answer / 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

More OOPS Interview Questions

suppose A is a base class and B is the derved class. Both have a method foo which is defined as a virtual method in the base class. You have a pointer of classs B and you typecast it to A. Now when you call pointer->foo, which method gets called? The next part of the question is, how does the compiler know which method to call?

3 Answers   EA Electronic Arts,


what is opps?why it is use in programming language?

2 Answers   Wipro,


can you explain how to use JavaBean in Project

3 Answers   Infosys, Satyam,


What is polymorphism give a real life example?

0 Answers  


Why do we need oop?

0 Answers  






tell about copy constructor

3 Answers   Siemens,


Write on signed and unsigned integers and give three (3) examples each

1 Answers  


There are 2 empty jars of 5 and 3 liters capacity. And a river is flowing besides. I want to measure 4 liters of wanter using these 2 jars. How do you do this?

4 Answers  


which are the 4 members functions in c++ objects that can either be declared explicitly by programmer or implementation if nt available.

4 Answers  


what type of questions

0 Answers   IBM,


WRITE A SIMPLE C++ PROGRAM TO SWAP TWO NOS WITHOUT USING TEMP

2 Answers  


What is new keyword in oops?

0 Answers  


Categories