C Interview Questions
Questions Answers Views Company eMail

In which area global, external variables are stored?

3 4746

what is inline function?

2 2824

why program counter is 16 bit?

3 3128




void main() { int a=1; printf("%d %d %d",a,++a,a++); } the output is supposed to be 1 2 2....but it is 3 3 1 this is due to calling conventions of C. if anyone can explain me how it happens?

7 16684

can we define a function in structure?

2 3806

can we declare a function in side the structure?

HCL,

2 2431

can we initialize all the members of union?

2 5084

what is the structure pointer?

Accenture, HCL,

975




where do we use volatile keyword?

1 2398

Find greatest of two numbers using macro

Bosch, Siemens,

4 29453

what will be the output of this program........ main() { int a=2,b=4,c=6; printf("%d"); } why it gives the value of third variable.

HCL,

6 3459

increment operateor (++)and decrament(--) #include #inclide main() { int x=15; while(x!=0) scanf("%d",&x); {

HCL, Syntel, TCS,

2 3035

Describe for loop and write a c program to sum the series X + x2/2! + x3 /3! + …….. up to fifteen terms.

2 8442

Develop a flow chart and write a c program to find the roots of a quadratic equation ax2+bx+c=0 using switch and break statement.

TCS,

1 10083

Can you write the algorithm for Queue?

TCS, College School Exams Tests,

855


Post New C Questions






Un-Answered Questions { C }

Give basis knowledge of web designing ...

896


my project name is adulteration of chille powder.how can i explain it to the hr when he asks me about the project?

358


develop a breakfast order booking system using Functions, Structures and Arrays. The system is to support the operations shown to the user in the following system’s menu: Welcome to Asim's Restaurant Select an operation? 1 Make a breakfast order 2 Modify existing order 3 Cancel existing order 4 Print Bill 5 Exit Type in your selection (1, 2, 3, 4 or 5): The program will include an array of structures. The structure type is called MenuItem, and the array of structures should be declared as menu[50] to store upto 50 breakfast menu items. The MenuItem structure must have the following 4 data fields (i.e. members): Code, description, unitprice, and quantity. Your program must define at least the following functions:  Function LoadData(…) that loads the data of breakfast menu items from an input file menu.txt into the array menu.  Five separate functions to handle the program main menu five tasks shown above. In general, function main() should load the data into the array menu and display the main menu of the above mentioned tasks. Based on the option selected, the corresponding function should be called. Users must make an order before requesting modify, cancel or print order bill (See the given sample run). Here is a more detailed explanation on the above tasks and functions. LoadData(…) Opens the input file menu.txt (you will create it) containing breakfast menu items data (See below) and assign these values to the corresponding array menu structure fields. Assign zero to the quantity field of the loaded menu items. Welcome to Asim's Restaurant Select an operation? 1 Make a breakfast order 2 Modify existing order 3 Cancel existing order 4 Print Bill 5 Exit Type in your selection (1, 2, 3, 4 or 5): MakeOrder(…) This function is called when the user selects option 1 from the main menu. It first displays the breakfast menu items to the user (stored in the array menu) along with all the necessary information (item code, description and unit price). It then requests the user to select an item using the item code (see the sample run). When the user enters an item code number the program should verify the code number and increment the quantity of the selected item in the array menu. Your program should reject invalid item codes and request the user to re-enter the item code or stop the entry. PrintBill(…) This function is called when the user selects option 4 from the main menu. The function displays the breakfast menu items in the breakfast order by printing the values of all MenuItem members of the array menu that have quantity value above zero. Print a nicely formatted bill (See the sample run). CancelOrder(…) This function is called when the user selects option 3 from the main menu. It will cancel the breakfast order by setting the quantity value of all the array menu structures to zero. ModifyOrder(….) This function is called when the user selects option 2 from the main menu. The task of this function is to allow the user to edit an existing breakfast order with two operations: Adding more breakfast items and/or altering the breakfast item that were ordered before (examine the sample program run). Handling Errors and Invalid Input Your program should reply safely to any erroneous situation or input with appropriate message to the user and flow nicely and correctly to the next operation (Examine the sample program run). Additional functions Use of functions is highly recommended for any additional special tasks needed by your solution. Global variables are not allowed except for max array menu size 50. You must pass the needed parameters through functions parameter lists.

1190


Why is it important to memset a variable, immediately after allocating memory to it ?

884


write a program to convert a expression in polish notation(postfix) to inline(normal) something like make 723+* (2+3) x 7 (not sure) just check out its mainly printing expression in postfix form to infix.

1535






cavium networks written test pattern ..

2513


what are the program that using a two dimensional array that list the odd numbers and even numbers separately in a given 10 inputs values

522


what are the facialities provided by you after the selection of the student.

1010


Write the program with at least two functions to solve the following problem. The members of the board of a small university are considering voting for a pay increase for their 10 faculty members. They are considering a pay increase of 8%. Write a program that will prompt for and accept the current salary for each of the faculty members, then calculate and display their individual pay increases. At the end of the program, print the total faculty payroll before and after the pay increase, and the total pay increase involved.

1605


what is associativity explain what is the precidence for * and & , * and ++ how the folloing declaration work 1) *&p; 2) *p++;

1126


Which driver is a pure java driver

232


what type of questions arrive in interview over c programming?

902


hai iam working in sap sd module for one year and working in lumax ind ltd in desp department but my problem is i have done m.b.a in hr/marketing and working sap sd there is any combination it. can you give right solution of my problem. and what can i do?

993


please explain clearly about execution of c program in detail,in which stage are the printf sacnf getting into exeecutable code

943


write a program for the normal snake games find in most of the mobiles.

1181