C Interview Questions
Questions Answers Views Company eMail

If 4 digits number is input through the keyboard, Write a program to calculate sum of its 1st & 4th digit.


12 27360

Write a C function to search a number in the given list of numbers. donot use printf and scanf

TCS, Honeywell,

6 6514

what is out put of the following code? #include class Base { Base() { cout<<"constructor base"; } ~Base() { cout<<"destructor base"; } } class Derived:public Base { Derived() { cout<<"constructor derived"; } ~Derived() { cout<<"destructor derived"; } } void main() { Base *var=new Derived(); delete var; }


3 4710

Find string palindrome 10marks

Infosys, Honeywell, Roland, Riktam,

5 7493

a C prog to swap 2 no.s without using variables just an array?


5 4885

Write a program in c to input a 5 digit number and print it in words.

11 51602

How to receive strings with spaces in scanf()

7 4931

i want explaination about the program and its stack reprasetaion fibbo(int n) { if(n==1 or n==0) return n; else return fibbo(n-1)+fibbo(n-2); } main() { fibbo(6); }

2 2336

wap in c to accept n number display the highest and lowest value

2 5183

wap in c to accept a number display the total count of digit

4 8388

what are the difference between ANSI C and Let Us c and Turbo C

LG Soft,

4 15105

The code is::::: if(condition) Printf("Hello"); Else Printf("World"); What will be the condition in if in such a way that both Hello and world are printed in a single attempt?????? Single Attempt in the sense... It must first print "Hello" and it Must go to else part and print "World"..... No loops, Recursion are allowed........................

IBM, HOV Services, Potty,

14 15228

what is the other ways to find a logic to print whether a number is an even or odd wit out using % symbol??????? i know three different ways to print it. so i need any other different logic>>>>>


5 4759

i want to know the procedure of qualcomm for getting a job through offcampus



i want to know aptitude questions,technical questions

2 4121

Post New C Questions

Un-Answered Questions { C }

Design a program which assigns values to the array temperature. The program should then display the array with appropriate column and row headings.


‘SAVEPOINT’ and ‘ROLLBACK’ is used in oracle database to secure the data comment. Give suitable examples of each with sql command.


Write a C program that will accept a hexadecimal number as input and then display a menu that will permit any of the following operations to be carried out: Display the hexadecimal equivalent of the one's complement. (b) Carry out a masking operation and then display the hexadecimal equivalent of the result. (c) Carry out a bit shifting operation and then display the hexadecimal equivalent of the result. (d) Exit. If the masking operation is selected, prompt the user lor the type of operation (bitwise and, bitwise exclusive or, or bitwise or) and then a (hexadecimal) value for the mask. If the bit shifting operation is selected. prompt the user for the type of shift (left or right), and then the number of bits. Test the program with several different (hexadecimal) input values of your own choice.


write a program to generate address labels using structures?


what is the diffrenet bettwen HTTP and internet protocol


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


Sir i need notes for structure,functions,pointers in c language can you help me please


Q.1 write aprogram to stack using linklist o insert 40 items? Q.2 write a program to implement circular queue with help of linklist?


Suppose we have a table name EMP as below. We want to perform a operation in which, I want to change name ‘SMITH’ from as ‘SMITH JAIN’. Also I want to change the name of the column from ENAME to E_NAME. EMPNO ENAME JOB MGR HIREDATE SAL 7369 SMITH Coder 7902 17-DEC-80 800 7499 ALLEN SALESMAN 7698 20-FEB-81 1600 7521 WARD SALESMAN 7698 22-FEB-81 1250


Read N characters in to an array . Use functions to do all problems and pass the address of array to function. 1. Print only the alphabets . If in upper case print in lower case vice versa. 2. Enter alphanumeric characters and form 2 array alphaets and digits.Also print the count of each array. 3. Find the count of a certain character. 4. Print the positions where a certain character occured. 5. Print the characters between successive array elements. 6. Find the largest and smallest charcter. How many times it each one occured. 7. Enter a certain range. Print out the array elements which occured between these range. 8. Reverse a character array without using another array. 9. Reverse an array region. 10. Replace a the array elements with it next character . Use a after z. 11. Code the array element with certain character as first alphabet. 12. Duplicate all the vowels in a character array. What is the new count. 13. Delete the vowels in a character array. What is the new array count. 14. Print the count of all characters in the array. 15. Enter n alphabets and store a upto tht charcter in array.What is the array count? 16. Sort a character array. 17. Merge 2 character arrays largearray,smallarray. 18. Find the pair with largest number of characters in between. 19. Find the numerical value of a charcter array. 20. Store n numeral characters in an arrray. Insert another numeral character in a certain position. 21. Insert a character in a sorted array. 22. Merge 2 sorted arrays in sorted fashion. 23. Duplicate the least occuring character. 24. Write a menu driven program to circular right/left shift an array of n elements. 25. Is the character array palindrome? if not make it palindrome. 26. Concatenate the first n charaters to the end of the string. 27. Print all n group of chracters which are palindrome. 28. Concatneate the reverse of last n characters to the array.


#include int main(){ int i=10; int *ptr=&i; *ptr=(int *)20; printf("%d",i); return 0; } Output: 20 can anyone explain how came the output is 20


what is use of malloc and calloc?


what is the structure pointer?


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.


Write a program to produce the following output: 1 2 3 4 5 6 7 8 9 10