do u print this format '(((())))'. This brackets is based on
user input like 4 or 5 or 6,without using any loop's?
Answer / 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 |
Define C in your own Language.
What is the use of a semicolon (;) at the end of every program statement?
What functions are used in dynamic memory allocation in c?
how to solve "unable to open stdio.h and conio.h header files in windows 7 by using Dos-box software
What's wrong with the call "fopen ("c:\newdir\file.dat", "r")"?
i have to apply for the rbi for the post of officers. i need to know abt the entrance questions whether it may be aps or techinical....
i want to know aptitude questions,technical questions
about c language
ABCDCBA ABC CBA AB BA A A
Write a c program for sum of first n terms of the series S = 1 - (1/3) + (1/5) -(1/7) + (1/9) ......
What are runtime error?
write a program to swap Two numbers without using temp variable.
75 Answers EMC, Focus, GreyB, HCL, Hitech, HP, Huawei, Infosys, Mannar Company, Microsoft, Miles Software, Odessa Technologies, Satyam, TCS, Wipro,