C Interview Questions
Questions Answers Views Company eMail

main() { int x=20,y=35; x = y++ + x++; y = ++y + ++x; printf("%d %d\n",x,y); } what is the output?


10 7632

main() { int x=5; printf("%d %d %d\n",x,x<<2,x>>2); } what is the output?


9 7465

#define swap1(a,b) a=a+b;b=a-b;a=a-b; main() { int x=5,y=10; swap1(x,y); printf("%d %d\n",x,y); swap2(x,y); printf("%d %d\n",x,y); } int swap2(int a,int b) { int temp; temp=a; b=a; a=temp; return; } what are the outputs?


4 9818

#include main() { char s1[]="Ramco"; char s2[]="Systems"; s1=s2; printf("%s",s1); } what will happen if you executed this code?


4 5445

#include main() { char *p1; char *p2; p1=(char *) malloc(25); p2=(char *) malloc(25); strcpy(p1,"Ramco"); strcpy(p2,"Systems"); strcat(p1,p2); printf("%s",p1); } Tell me the output?


6 7234

main() { int x=10,y=15; x=x++; y=++y; printf("%d %d\n",x,y); } output??

TCS, EBS, Ramco, Sangwin,

19 21757

main() { int a=0; if(a=0) printf("Ramco Systems\n"); printf("India\n"); } output?


7 6482

#include int SumElement(int *,int); void main(void) { int x[10]; int i=10; for(;i;) { i--; *(x+i)=i; } printf("%d",SumElement(x,10)); } int SumElement(int array[],int size) { int i=0; float sum=0; for(;i


5 4785

const char * char * const What is the differnce between the above tow?.

Ramco, TCS,

6 5807

two variables are added answer is stored on not for third variable how it is possible?

3 3243

how to convert binary to decimal and decimal to binary in C lanaguage

IBM, BPO, Far East Promotions, RBS,

7 20683

what is use#in c

3 3690

how to connect oracle in C/C++.

Wipro, TCS,

3 6517

How to use c/c++ code in JAVA

IBM, CDAC, Satyam, Scope International,

10 13044

Explain the importance and use of each component of this string: Foo.Bar, Version=, Culture=neutral, PublicKeyToken=593777ae2d274679d


1 4740

Post New C Questions

Un-Answered Questions { C }

write a programming in c to find the sum of all elements in an array through function.


how can i access hard disk address(physical address)? are we access hard disk by using far,near or huge pointer? if yes then please explain.....


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


please explain every phase in the "SDLC" in the dotnet.


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.


what is stack , heap ,code segment,and data segment


In this assignment you are asked to write a multithreaded program to find the duplicates in an array of 10 million integers. The integers are between -5000,000 to 5000,000 and are generated randomly. Use 10 threads, each thread works on 1000,000 integers. Compare the time needed to accomplish the task with single thread of execution program. Do not include the time to fill the array with integers in the execution time.


a single linked list consists of nodes a to z .print the nodes in reverse order from z to a using recursion


the factorial of non-negative integer n is written n! and is defined as follows: n!=n*(n-1)*(n-2)........1(for values of n greater than or equal to 1 and n!=1(for n=0) Perform the following 1.write a c program that reads a non-negative integer and computes and prints its factorial. 2. write a C program that estimates the value of the mathematical constant e by using the formula: e=1+1/!+1/2!+1/3!+.... 3. write a c program the computes the value ex by using the formula ex=1+x/1!+xsquare/2!+xcube/3!+....


what do u mean by Direct access files? then can u explain about Direct Access Files?


stripos — Find position of first occurrence of a case- insensitive string int stripos ( char* haystack, char* needle, int offset ) Returns the numeric position of the first occurrence of needle in the haystack string. Note that the needle may be a string of one or more characters. If needle is not found, stripos() will return -1. The function should not make use of any C library function calls.


main() { static char *s[]={"black","white","yellow","voilet"}; char **ptr[]={s+3,s+2,s+1,s}, ***p; p=ptr; **++p; printf("%s",*--*++p+3); }


char *p="name"; printf(p);


Write a function stroverlap that takes (at least) two strings, and concatenates them, but does not duplicate any overlap. You only need to worry about overlaps between the end of the first string and the beginning of the second string. Examples: batman, manonthemoon = batmanonthemoon batmmamaman, mamamanonthemoon = batmmamamanonthemoon bat, man = batman batman, batman = batman batman, menonthemoon = batmanmenonthemoon