C Interview Questions
Questions Answers Views Company eMail

create an SINGLE LINKED LISTS and reverse the data in the lists completely

3 3092

hi , please send me NIC written test papers to sbabavalli@gmail.com



Can u please send me the exam pattern and also Previous papers to javed123go@gmail.com


how to print value of e(exp1)up to required no of digits after decimal?

1 1951

writw a program to insert an element in the begning of a doubly linked list

1 2825

main() { int arr[5]={23,67}; printf("%d%d%d",arr[2],arr[3],arr[4]); }


9 3976

main() {int a=200*200/100; printf("%d",a); }


14 6829

main() { float a=3.2e40; printf("%d",a); }


9 4917

write program on arrays

GE, Polycab,

3 2978


4 3486

can we print any string without using terminator?

Infosys, TCS,

2 5283

#include int fun(); int i; int main() { while(i) { fun(); main(); } printf("hello \n"); return 0; } int fun() { printf("hi"); } answer is hello.how??wat is tat while(i) mean?


7 8459

wat is the difference between a definition and declaration? float y;---it looks like a declaration..but it s a definition.how?someone explain


3 7266

void main() { int s[4][2]={ {1234,56},{1212,33},{1434,80},{1312,78} }; int (*p)[2]; int i,j,*pint; for(i=0;i<=3;i++) { p=&s[i]; pint=p; printf("\n"); for(j=0;j<=1;j++) printf("%d",*(pint+j)); } } while running this program it shows a warning-suspicious pointer conversion ie pint=p; my que is why should we assign the value of p to pint again.why cant we use it directly as *(p+j)..but if i use like tat the o/p is garbage value..

1 1858

void main() {int a[5],i,b=16; for(i=0;i<5;i++) a[i]=2*i; f(a,5,b); for(i=0;i<5;i++) printf("\n %d",a[i]); printf("\n %d",b); } f(int *x,int n,int y) { int i; for(i=0;i


2 2688

Post New C Questions

Un-Answered Questions { C }

provide an example of the Group by clause, when would you use this clause


Hello friends !!! I’am Abhinav Ranjan Sinha College- L.K.C.T(Indore) I just want to express my personnal experience of getting placed at Consagous Technologies,to all freshers who are in search of the job. On 25th of Feb 2011 there was a campus drive of Consagous Technologies in our college.That was the second time any software company is coming to our college for batch, I was very excited. Firstly, they started with a seminar, a small introduction about the company.Then as the first round of the placement process, they conducted GD, in every group there was 20 students, and in the GD they just given the topics on the current affairs ,like- Global warming, Science is a curse or boon, girls are superior than boys?, etc. Then after half an hour the result of GD was announced , and fortunetly I was selected among the 150 other students. Then there was a written round, that was fully Technical , the question paper consists of total 50 questions out which 45 are optional and the rest of the 5 questions are not optional. Some of them which I remember are- 1.when we pass an argument to a function , then how it is being interpreted? Ans- Address of the first element of an array. 2.how the size of structure can be determined? 3.Complexity of binary search algorithm? Ans-0(logn) 4.what does the symbol << do in c++? 5.what does (.) dot operator do? 6.what is RTTI? 7.What is containership? And many more questions related to data structure on complexity, C program output, etc Then the result was declared on the next day, total 45 students are short leasted out of 150(approx) and the further rounds of Technical and HR are after two days. Then on 28th of Feb 2011 we are called for the next rounds, and that was the toughest time ever as my turn came almost at last , firstly my name was announced for the Technical round, there when I entered there are 3 persons inside the room who are taking the interview, as I entered they asked me to reduce the speed of the fan, I went to the switch board but the regulator was not working , then they told me to switch it off. Then , they offerd me to have a seat, there they asked me about- 1. what is your area of interest? 2. what is recursion? 3. write a program of factorial using recursion. 4. differentiate between My sql and Sql server. 5. they asked me questions related to my minor project. 6. what does get and post method do? 7. what is structure? 8. what is union? Out of which I have given answers of the many of them. Then I was called for the PI (personnmal interview) , I was very tired as it was 6:30 and I was waiting for my turn from 11’o clock onwards. But as I was very much exited , I just prayed to God and entered in the room, As I entered I saw two persons there inside the room I wished both of them, and they offerd me the chair, I replied with thank you sir thank you mam. Then the first question which I was asked there is- 1.Tell me something about yourself? Then, 2.they asked me of my strengths. 3.then suddenly they started asking aptitude questions, and the main thing is that they are not repeating the questions, you have to listen it very carefully. And the questions are like— Que- a man moves 50 km away from his house in the north direction, then he turns left and moves 50 km , and then again he turns left and moves 50 km, then at which place he is from his house and at what distance? Que- the ratio of the age of the two friends are in the ratio 6:5 then there ratio becomes 8:7 , so how many years they will it takes to gain this ratio? 4.where do you see yourself after 5 years? 5.tell me your 5 such skills which you can give to our organization. 6.what do you know about our company? They both are very calm and are of very good nature, and they are very supportive which helped me a lott . And just after half an hour the results had been declared and fortunetly with God’s Grace I got selected, that was the one of the very most imported and cherishable moment of my life. All The Best to all my dear friends , and I wish you for your bright future. And , at last but not the least, I would like to thanks to Consagous Technologies to give me such a big opportunity to prove myself in my life, thank you so much.


about c language


a) Identify the following declarations. Ex. int i (integer variable) float a[l0](array of 10 real nos) int (*f())() void *f int (*f()) [] void *f int f[] [] [] char *(*f) () int (*f[]) [] float(*f) [] [] float **f int ******f


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?


how to print electricity bill according to following charges first 100 units -1rs per unit for next 200 units-1.50 rs per unit without using conditions


How to implement a packet in C


Write a c program to build a heap method using Pointer to function and pointer to structure ?


why wipro wase


hello freinds next week my interview in reliance,nybody has an idea about it intervew questions..so tell


hi, which software companys will take,if d candidate's % is jst 55%?


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.


to print the salary of an employee according to follwing calculation: Allowances:HRA-20% of BASIC,DA-45% of BASIC,TA-10%. Deductions:EPF-8% of BASIC,LIC-Rs.200/-Prof.Tax:Rs.200/- create c language program?


You have given 2 array. You need to find whether they will create the same BST or not. For example: Array1:10 5 20 15 30 Array2:10 20 15 30 5 Result: True Array1:10 5 20 15 30 Array2:10 15 20 30 5 Result: False One Approach is Pretty Clear by creating BST O(nlogn) then checking two tree for identical O(N) overall O(nlogn) ..we need there exist O(N) Time & O(1) Space also without extra space .Algorithm ?? DevoCoder guest Posted 3 months ago # #define true 1 #define false 0 int check(int a1[],int a2[],int n1,int n2) { int i; //n1 size of array a1[] and n2 size of a2[] if(n1!=n2) return false; //n1 and n2 must be same for(i=0;ia1[i+1]) && (a2[i]>a2[i+1]) ) ) return false; } return true;//assumed that each array doesn't contain duplicate elements in themshelves }


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