C Interview Questions
Questions Answers Views Company eMail

a program that can input number of records and can view it again the record



What is the output of below code? main() { static in a=5; printf("%3d",a--); if(a) main(); }

TCS, Infosys,

4 3891

What is the output of below code? main() { static int a=5; printf("%3d",a--); if(a) main(); }

1 2448

main() { int i,n=010; int sum=0; for(i=1;i<=n;i++) {s=s+i; } printf("%d",&s); getch(); }

6 5742

write a c program to add two integer numbers without using arithmetic operator +

Value Labs,

13 13730

is c language is a object oreinted language?


5 2917

wat is the meaning of c?

IBM, Wipro, CTS,

9 4610

define switch statement?


6 3984

The variables are int sum=10,SuM=20; these are same or different?

3 2360

what is the output of below code int x=8,y; x>>=2; y=x; what is y value. NOTE:EXPLANATION IS COMPALSARY with binary bits


2 2606

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


1 2151

shorting algorithmS





4 3491





CTS, Wipro,

3 3747

Post New C Questions

Un-Answered Questions { C }

Write a program that accept anumber in words


write a program that types this pattern: 12345678987654321 12345678 87654321 1234567 7654321 123456 654321 12345 54321 1234 4321 123 321 12 21 1 1


What is mean by Data Driven framework in QTP? Can any one answer me in details on this regard.


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




write a program in C that prompts the user for today's date,tomorrow's date and display the results.Use structures for today's date,tomorrow's date and an array to hold the days for each month of the year.


#include #include struct stu { int i; char j; }; union uni { int i; char j; }; void main() { int j,k; clrscr(); struct stu s; j=sizeof(s); printf("%d",j); union uni u; k=sizeof(u); printf("%d",k); getch(); } what is value of j and k.


A c program to display count values from 0 to 100 and flash each digit for a secong.reset the counter after it reaches 100.use for loop,. pls guys hepl me.. :(


Write a C Program That Will Count The Number Of Even And Odd Integers In A Set using while loop


write a c program to find the largest and 2nd largest numbers from the given n numbers without using arrays


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.


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.


write a program to generate address labels using structures?


What is the purpose of the following code? Is there any problem with the code? void send(int count, short *to, short *from) { /* count > 0 assumed */ register n = (count + 7) / 8; switch (count % 8) { case 0: do { *to = *from++; case 7: *to = *from++; case 6: *to = *from++; case 5: *to = *from++; case 4: *to = *from++; case 3: *to = *from++; case 2: *to = *from++; case 1: *to = *from++; } while (--n > 0); } }


c program for searching a student details among 10 student details