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
Where static variables are stored in c?
What is the symbol indicated the c-preprocessor?
What are keywords in c with examples?
What is the difference between new and malloc functions?
Declare the structure which contains the following members and write in C list of all students who score more than 75 marks. Roll No, Name, Father Name, Age, City, Marks.
What language is lisp written in?
writ a program to compare using strcmp VIVA and viva with its output.
Are bit fields portable?
1234554321 1234 4321 123 321 12 21 1 1 12 21 123 321 1234 4321 1234554321
how many types of operators are include in c language a) 4 b) 6 c) 8 d) 12
What is pointer to pointer in c?
how to find binary of number?
What is break statement?
1) There is a singing competition for children going to be conducted at a local club. Parents have been asked to arrive at least an hour before and register their children’s names with the Program Manager. Whenever a participant registers, the Program Manager has to position the name of the person in a list in alphabet order. Write a program to help the Program Manager do this by placing the name in the right place each time the Program Manger enters a name. The Logic should be written in Data Structures?
#define f(g,h) g##h main O int i=0 int var=100 ; print f ("%d"f(var,10));} wat would be the output??