C Interview Questions
Questions Answers Views Company eMail

how can i get the output 54321 4321 321 21 1 in c programming........???? pls help......

Infosys,

10 27936

what is the difference between auto and static keywords

cDot, TCS, College School Exams Tests,

1 1000

Write a simple program to find the size of different basic data types in C.

3 6934




Write a program in C for showing working of different logical operator in C. Your program should guide users with proper message/menu on the console.

HCL,

3 7965

Write a function to find the area of a triangle whose length of three sides is given

2 13196

Method Overloading exist in c ?

Wipro,

3 3879

How pointer is benefit for design a data structure algorithm?

2 2371

why little endian and big endian came?y they using differently? y they not used commonly ?wt is application of little and big ?

1 2021




WHAT IS RTGS N MINIMUM AMT TO B TRANSFERD N WHAT R THE CHARGES ON MINIMUM AMT N IN WHICH BANK WE CAN DO IT?

1 2196

Write the program that calculates and prints the average of several integers. Assume that the last value read is sentinel 9999.

1863

what do you mean by defining a variable in our c code?

2 3502

what is the difference between definition and declaration? give me some examples.

TCS,

2 2927

Write a C program to help a HiFi’s Restaurant automate its breakfast billing system. Your assignment should implement the following items: a. Show the customer the different breakfast items offered by the HiFi’s Restaurant. b. Allow the customer to select more than one item from the menu. c. Calculate and print the bill to the customer. d. Produce a report to present your complete program and show more sample output. Assume that the HiFi’s Restaurant offers the following breakfast menu: Plain Egg $2.50 Bacon and Egg $3.45 Muffin $2.20 French Toast $2.95 Fruit Basket $3.45 Cereal $0.70 Coffee $1.50 Tea $1.80

1570

write a c program for greatest of three numbers without using if statment

IBM,

4 12666

what is the role you expect in software industry?

Wipro, HCL,

2 2357


Post New C Questions






Un-Answered Questions { C }

1.int a=10; 2.int b=20; 3. //write here 4.b=30; Write code at line 3 so that when the value of b is changed variable a should automatically change with same value as b. 5.

887


diff between exptected result and requirement?

851


I need previous papers of CSC.......plz help out by posting them.......

975


Hai sir, I had planned to write the NIC scientific engineer exam , plz post the sample question......

832


Sir,please help me out with the code of this question. Write an interactive C program that will encode or decode multiple lines of text. Store the encoded text within a data file, so that it can be retrieved and decoded at any time. The program should include the following features: (a) Enter text from the keyboard, encode the text and store the encoded text in a data file. (b) Retrieve the encoded text and display it in its encoded form. (c) Retrieve the encoded text, decode it and then display the decoded text. (d) End the computation. Test the program using several lines of text of your choice.

905






write a c program to print the next of a particular no without using the arithmetic operator or looping statements?

2116


Topics: Structures, Arrays, Searching and Sorting Assume there is a small mobile computer device including a hard disk and a slot for a memory card. The device shall be used to backup photos e.g. during holiday. Every time a memory card is connected all photos of the card are copied into a new folder automatically. And your task is to develop some basic controlling software to show, add, remove, search and sort the directories of photos. Step by Step Implementation 1.Define two symbolic constants, one to hold the total volume of the disk (e.g. VOLUME) and another one to hold the number of entries the files system of the device can handle (MAXFOLD). 2.Define a new structure data type named DATE to store a date consisting of year, month and day as unsigned values. 3.Define an other structure data type FOLDER to store the information of one folder of photos: ◦A title as character array of appropriate length ◦The location (event) the photos are taken as character array of appropriate length ◦The date of the day the photos are copied to the disk using the just defined data type DATE ◦The number of photos as natural number ◦And the size of the folder in MB as floating point value 4.Define the following global variables and initialise them: ◦disk as an array with MAXFOLD elements of data type FOLDER ◦folders as natural value to count the number of folders currently stored at the disk (valid elements in the array) TEST: Now you should be able to compile the code the first time without any warning or error. In the menu only "p" to print and "q" to quit will work!. 5.Now complete the functions given by their prototype: float freeSpace ();The function has to calculate the sum of the size component of all elements currently stored in the disk array. The function shall return the free space of the disk by the difference between the available total volume and the calculated sum. TEST: To test this function you only need to uncomment printing the "statusline" at the function actionmenu(). Compare the calculated value with a manual calculation of the example values given above. unsigned isBefore (DATE, DATE);The function checks if one date is before the other. There are 3 different possibilities which have to be handled. Imagine for example these 3 different combinations of values: ◦2010-01-01 : 2010-01-02 ◦2010-01-01 : 2010-02-01 ◦2010-01-01 : 2009-01-01 The function shall just return the result of the comparison. unsigned isEqual (DATE, DATE);The function checks if one date is equal to the other, all components have to be compared. The function shall just return the result of the comparison. int findByDate (DATE);As the array is should be kept in order (sorted by date) implement a binary search for a folder by its date here. You need only to adapt the binary search we used in the exercise. Use the 2 comparing functions above where appropriate. The function shall return the index of the element which was found or -1. TEST: Now you can try searching a folder by date via the "s" in the menu. Activate the corresponding part in the main function. int isSpaceLeft (FOLDER);This function compares the free space of the disk with the size of folder given with the parameter list. The function shall return 1 if there is enough space to add the folder, otherwise 0 (just the result of the comparison). void SortByDate ();This function shall implement the InsertionSort using the component date as key. Use the provided algorithm/souce code of the exercise as template. If you need a comparison between dates, use the function isBefore you have written again. void addFolder (FOLDER);The function has to check if the disk has additional capacities to add the new folder (number of folders and space left). If at least one of these conditions is false print an error message and return -1. Else there has to be added an other test to avoid 2 folder elements with the same date (use the findByDate function here. If there is no folder with the new date simply attach the new folder at the end of the array and call the sorting algorithm afterwards to keep the order in the array. TEST: Now you can try to add a folder via the "a" in the menu. Activate the corresponding part in the main function. void delDir (int);This function removes one element of the disk array. The input parameter contains the index of the element to delete. Deletion can simply be done by moving all elements at the right one to the left (overwriting the element to delete. The function may get a -1. This has to be checked first (certainly there is nothing to delete then!) Don't forget to decrement the counter of elements at the end. TEST: Now you can try to remove a folder by date via the "r" in the menu. Activate the corresponding part in the main function. unsigned findAllOfLocation(char[], FOLDER[]);This is an optional additional task: The function shall find all elements with the given value for the component location (first input parameter). The array elements which are found have to be added to the FOLDER array (second input parameter). As this parameter is an array we can use the result later in the main function. There kernel of function implements a modified linear search on the disk array (it does not stop if one element is found bat continues search until the location of all elements is checked). The finally function shall return the number of elements found in the disk array. TEST: Now you can try to add a folder by date via the "l" in the menu. Activate the corresponding part in the main function.

1196


`write a program to display the recomended action depends on a color of trafic light using nested if statments

883


code for quick sort?

832


PLS U SENS ME INTERVIEW O. MY EMAIL ADD, SOFIYA.SINGH@GMAIL.COM

946


write a c program thal will find all sequences of length N that produce the sum is Zero, print all possible solutions?

1653


write a programe to accept any two number and check the following condition using goto state ment.if a>b,print a & find whether it is even or odd and then print.and a

693


write a c program for swapping two strings using pointer

1327


hw can we delete an internal node of binary search tree the internal node has child node..plz write progarm

884


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

794