"Back end part"!? There is no such thing.
It depends what language you are using. Structured languages provide the easiest method, simply call the function containing your subroutine and control will automatically return to the point of the call when the function ends. You can even use functions to return a value to the caller. If functions are not an option, the language might provide a gosub statement. This is similar to a goto statement but returns control to the caller, much like a function would in a structured language.
1
Strictly speaking, only one.However, a trick many programmers use is to have the function create "side effects" by changing the value of its arguments as well as returning a value. A pseudocode example might be something like a file-existence checker. It would be a boolean function that returns TRUE if the file exists and FALSE if it doesn't. However, depending on the language used it could also modify its arguments so they provided the file's size and record type if it exists. For example: if bFileExists (cFileName, iFileSize, iRecType) then {do something with iFileSize ...}
#include void main(void) { char base_digits[16] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'}; int converted_number[64]; long int number_to_convert; int next_digit, base, index=0; /* get the number and base */ printf("Enter number and desired base: "); scanf("%ld %i", &number_to_convert, &base); /* convert to the indicated base */ while (number_to_convert != 0) { converted_number[index] = number_to_convert % base; number_to_convert = number_to_convert / base; ++index; } /* now print the result in reverse order */ --index; /* back up to last entry in the array */ printf("\n\nConverted Number = "); for( ; index>=0; index--) /* go backward through array */ { printf("%c", base_digits[converted_number[index]]); } printf("\n"); }
The function of back pressure valve is to prevent back flow to the pump in case there is an obstruction on downstream side of valve.
#include#include#include#include#include//Global variables............int advance[5]={750,500,400,500,750};int r_no[10]={1,2,3,4,5,6,7,8,9,10};int room;tot[5]={0,0,0,0,0};int g_tot=0;int r_charge[5];char r_type[5][7];char r_cust[5][20]={"N.A","N.A","N.A","N.A","N.A"};char c_city[5][20];char name[30];int c_mem[5];char c_nat[5][20];char r_avail[5];int r_per[5];int no[5];int year[5];int month[5];int day[5];int i;//Function prototypes.........void getavail();void putavail();void features();void allocate();void putcust();void restaurant();void deallocate();void cancel();void intro();void screenheader();//Function definitions..........void screenheader(){printf("\n :::::::::::::::::::::::::::::::::::::");printf("\n :: ::");printf("\n :: @@@@@@@@@@@@@@@@@@@@@@@ ::");printf("\n :: @ @ ::");printf("\n :: @ WELCOME TO @ ::");printf("\n :: @ @ ::");printf("\n :: @ Lovely Coding @ ::");printf("\n :: @ @ ::");printf("\n :: @@@@@@@@@@@@@@@@@@@@@@@ ::");printf("\n :: ::");printf("\n :::::::::::::::::::::::::::::::::::::\n\n");}void intro(){printf("\n\t Near BSF Chowk, G.T. Road, Jalandhar City,\n\t\t\t\t Punjab 144001, INDIA");printf("\n\n Ph. No.:011-27223959");printf("\n\n\n WELCOMES YOU..............");printf("\n\n\n\tHotel Ganga Inn is one of the newest Hotel in Jalandhar. The Hotel is \t\tequipped with with all the general amenities and facilities that go \t\talong with memorable stay. Set amidst beautifully landscaped gardens, \t\tit proves to be a ideal dream destination for perceptive traveller.");printf("\n\n\tThe Hotel have well furnished rooms along with rooms providing pleasent \tviews of the city. The hotel satisfies the needs of business as well \t\tas the leisure traveller. All the rooms at the thotel are furnished \t\tbeautifully. All the rooms are fitted with amenities.");printf("\n\n AMENITIES .......\n");printf("\n\t\t\t1. 100% Power backup.\n");printf("\t\t\t2. Automatic lift.\n");printf("\t\t\t3. Ample parking space.\n");printf("\t\t\t4. Round the clock security.\n");printf("\t\t\t5. Running hot and cold water.\n");printf("\t\t\t6. Free internet service.\n");printf("\t\t\t7. 24 hours room service.\n");printf("\t\t\t8. Laundary service.\n");printf("\nPress any character to continue:");getch();}void getavail(){for(i=0;i9999)(month[room-1]>12)(month[room-1]30))((month[room-1]==2)&&((year[room-1]%400==0)((year[room-1]%4==0)&&(year[room-1]%100!=0)))&&(day[room-1]>29))((month[room-1]==2)&&(year[room-1]%4!=0)&&(day[room-1]>28))){delay(200);printf("\n\n!!!!!INVALID DATE........");getch();allocate();}else{printf("\n... Room is allocated to ");cputs(r_cust[room-1]);printf(" for %d days.",r_per[room-1]);r_avail[room-1]='N';getch();}// fprintf(fp,"%d %s %s %s %d %d %d %d %d\n",room[room-1],r_cust[room-1],c_city[room-1],c_nat[room-1],r_per[room-1],c_mem[room-1],year[room-1],month[room-1],day[room-1]);// fclose(fp);}else{printf("\n ERROR : Room cannot be allocated ...");printf("\n Room is not available...");getch();}}void deallocate(){clrscr();screenheader();printf("\nEnter the room number:");scanf("%d",&room);if(r_cust[room-1]=="N.A"){printf("\nThe room is empty........");getch();}else{printf("\nEnter the name of the person staying in the room:");fflush(stdin);gets(name);if(strcmpi(name,r_cust[room-1])==0){printf("\nRoom number %d is deallocated......",room);strcpy(r_cust[room-1],"N.A");getch();}else{printf("\nInvalid name........");getch();deallocate();}}g_tot=(r_per[room-1]*r_charge[room-1])-advance[room-1]+tot[room-1];printf("\n\nYour total bill is %d",g_tot);printf("\n\n\nThanks for staying in this hotel.........");}void cancel(){clrscr();screenheader();printf("\nEnter the room number:");scanf("%d",&room);if(r_cust[room-1]=="N.A"){printf("\nThe room is empty........");getch();}else{printf("\nEnter the name of the person staying in the room:");fflush(stdin);gets(name);if(strcmpi(name,r_cust[room-1])==0){printf("\nReservation for room number %d is cancelled......",room);strcpy(r_cust[room-1],"N.A");getch();}else{printf("\nInvalid name........");getch();cancel();}}g_tot=advance[room-1];printf("\n\nYour total bill is %d",g_tot);}void putcust(){int j;clrscr();screenheader();printf("\nEnter the room number :");scanf("%d",&room);j=strcmp(r_cust[room-1],"N.A");if(j==0){printf("\n Data not available ");getch();}else{printf("\n Room No :%d",r_no[room-1]);printf("\n Customer Name :");cputs(r_cust[room-1]);printf("\n Period :%d",r_per[room-1]);printf("\n City :");cputs(c_city[room-1]);printf("\n Nationality :");cputs(c_nat[room-1]);printf("\n No of member :%d",c_mem[room-1]);printf("\n Arrival Date :%d/%d/%d",day[room-1],month[room-1],year[room-1]);getch();}}void restaurant(){int count=0,z=0,fc[113],answ;char ans;int price[113]={245,245,245,245,240,240,240,240,235,235,250,235,235,220,215,230,215,240,250,250,250,250,250,250,250,255,245,245,245,245,250,240,240,360,290,360,290,370,295,360,290,360,290,250,360,290,360,290,250,370,290,360,290,250,250,280,245,290,235,265,240,290,300,256,240,265,270,255,255,240,240,235,220,25,30,25,30,35,35,25,30,35,25,35,25,25,30,100,105,105,100,105,100,105,125,105,105,100,105,110,115,100,100,100,105,105,105,105,125,105,120,120,100};char food[113][30]={"SHAHI PANEER","KADAI PANEER","CHEESE KORMA","MALAI KOFTA","MATAR PANEER","PALAK PANEER","MIX VEG.","ALOO GOBI","ALOO JEERA","CHANA MASALA","MATAR MUSHROOM","RAJMA MAKHANI","DAL MAKHANI","MIXED RAITA","BUNDI RAITA","PINEAPPLE RAITA","SALAD(GREEN)","DUM ALOO","MUSHROOM PANEER","MUTTON MASALA","MUTTON MUGHLAI","MUTTON KORMA","MUTTON DO PYAZA","MUTTON SAGH","MUTTON DAHI","MUTTON ROGAN JOSH","MUTTON CURRY","KADAI MUTTON","KEEMA LEVER","KEEMA MATAR","KEEMA EGG","BRAIN CURRY","EGG CURRY","BUTTER CHICKEN","BUTTER CHICKEN(1/2)","KADAI CHICKEN","KADAI CHICKEN(1/2)","BUTTER CHICKEN(BL)","BUTTER CHICKEN(BL)(1/2)","CHICKEN MUGHLAI","CHICKEN MUGHLAI(1/2)","CHICKEN MASALA","CHICKEN MASALA(1/2)","CHICKEN MASALA(1/4)","CHICKEN SAGH","CHICKEN SAGH(1/2)","CHICKEN DAHI","CHICKEN DAHI(1/2)","CHICKEN DAHI(1/4)","CHICKEN KORMA","CHICKEN KORMA(1/2)","CHICKEN DO PYAZA","CHICKEN DO PYAZA(1/2)","FISH CURRY","CHICKEN CURRY","CHICKEN CURRY(1/2)","CHICKEN CURRY(1/4)","CHILLI CHICKEN","TANDOORI ALOO","CHICKEN TIKKA","SEEKH KABAB","FISH TIKKA","CHICKEN TANDOORI","CHICKEN TANDOORI(1/2)","PANEER TIKKA","CHICKEN SEEKH KABAB","CHICKEN HARA KABAB","CHICKEN BIRYANI","MUTTON BIRYANI","PANEER PULAO","VEG.PULAO","JEERA RICE","STEAMED RICE","RUMALI ROTI","ROTI","NAN","ALOO NAN","PANEER NAN","KEEMA NAN","PARANTHA","ALOO PARANTHA","PANEER PARANTHA","PUDINA PARANTHA","BUTTER NAN","LACHCHA PARANTHA","MISSI ROTI","KHASTA ROTI","VEG.BURGER","PANEER BURGER","CHEESE SANDWICH","VEG.PATTI","CHICKEN PATTI","TEA","COFFEE","COLD COFFEE","PINEAPPLE","STRAWBERRY","CHOCOLATE","BLACK FOREST","DOUBLE STORIED","TRIPLE STORIED","SOFT CONE","VANILLA","STRAWBERRY","CHOCOLATE","CHOCO CHIPS","MANGO","TUTTI FRUITY","LICHI","PISTA BADAM","CHOCOLATE PISTA BADAM","CHOCO DIP","CHOCOLATE LICHI"};clrscr();screenheader();printf("\n *********");printf("\n MENU CARD");printf("\n *********");printf("\n\n VEGETARIAN");for(i=0;i
It depends what language you are using. Structured languages provide the easiest method, simply call the function containing your subroutine and control will automatically return to the point of the call when the function ends. You can even use functions to return a value to the caller. If functions are not an option, the language might provide a gosub statement. This is similar to a goto statement but returns control to the caller, much like a function would in a structured language.
1
Strictly speaking, only one.However, a trick many programmers use is to have the function create "side effects" by changing the value of its arguments as well as returning a value. A pseudocode example might be something like a file-existence checker. It would be a boolean function that returns TRUE if the file exists and FALSE if it doesn't. However, depending on the language used it could also modify its arguments so they provided the file's size and record type if it exists. For example: if bFileExists (cFileName, iFileSize, iRecType) then {do something with iFileSize ...}
get back one word
#include void main(void) { char base_digits[16] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'}; int converted_number[64]; long int number_to_convert; int next_digit, base, index=0; /* get the number and base */ printf("Enter number and desired base: "); scanf("%ld %i", &number_to_convert, &base); /* convert to the indicated base */ while (number_to_convert != 0) { converted_number[index] = number_to_convert % base; number_to_convert = number_to_convert / base; ++index; } /* now print the result in reverse order */ --index; /* back up to last entry in the array */ printf("\n\nConverted Number = "); for( ; index>=0; index--) /* go backward through array */ { printf("%c", base_digits[converted_number[index]]); } printf("\n"); }
A back-translation is a piece of text which has been translated from one language into another, and then into its original language.
Yo-yo means 'come back come back' in Tagalog, which is the Filipino language.
The function of back pressure valve is to prevent back flow to the pump in case there is an obstruction on downstream side of valve.
In what language?
The main function of the veins is to take blood back to the heart.
back bone and water