I am confused as to where Am I supposed to assigned a variable . my code goes like this

char text[]= "FRUITS";
printf("Enter between apple,orange or mango");
gets(text);

I want to assign a variable "User_select" to that printf part .

I do not understand your problem, post runnable code including the include statements and function definitions. You have not User_select defined. It is not safe to use gets, as you can not specify the maximum amount of characters you have allocated: http://www.daniweb.com/software-development/c/tutorials/45806

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.