do u print this format '(((())))'. This brackets is based on
user input like 4 or 5 or 6,without using any loop's?
Answer Posted / ashutosh tiwari
int r;
Void main()
{
scanf("%d",&r);
fun();
}
void fun()
{
static int t = r;
printf("(");
if(--t != 0)
fun();
printf(")");
}
OR
void main()
{
int r,i;
scanf("%d",&r);
i=r;
repeat1:
if(i != 0)
{
printf("(");
i--;
goto repeat1;
}
i=r;
repeat2:
if(i != 0)
{
printf(")");
i--;
goto repeat2;
}
}
| Is This Answer Correct ? | 11 Yes | 2 No |
Post New Answer View All Answers
What is the difference between single charater constant and string constant?
What is anagram in c?
Can I initialize unions?
why wipro wase
The postoder traversal is 7,14,3,55,22,5,17 Then ur Inorder traversal is??? please help me on this
In C programming, how do you insert quote characters (‘ and “) into the output screen?
What is scanf () in c?
What is a constant and types of constants in c?
Why c is called a middle level language?
which of the following is allowed in a "C" arithematic instruction a) [] b) {} c) () d) none of the above
Can we access the array using a pointer in c language?
Explain how do you sort filenames in a directory?
Explain #pragma statements.
The statement, int(*x[]) () what does in indicate?
general for is %wd,f-d; in this system "w" means a) 'w' represent total width of digits b) 'w' represent width which includes the digits before,after decimal place and the decimal point c) 'w' represent width which includes the digits before only d) 'w' represent width after decimal place only