Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Where static variables are stored in c?

1064


What is the symbol indicated the c-preprocessor?

1183


What are keywords in c with examples?

1054


What is the difference between new and malloc functions?

1072


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.

1272


What language is lisp written in?

1190


writ a program to compare using strcmp VIVA and viva with its output.

1995


Are bit fields portable?

1117


1234554321 1234 4321 123 321 12 21 1 1 12 21 123 321 1234 4321 1234554321

3639


how many types of operators are include in c language a) 4 b) 6 c) 8 d) 12

1035


What is pointer to pointer in c?

1075


how to find binary of number?

4374


What is break statement?

1071


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?

2413


#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??

1921