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?

Ramco,

10 8998

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

Ramco,

9 8348

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

Ramco,

4 11563




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

Ramco,

4 5810

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

Ramco,

6 8170

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

Ramco, TCS, EBS, Sangwin,

19 24903

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

Ramco,

7 6947

#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

Ramco,

5 5555




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

Ramco, TCS,

6 6126

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

3 3528

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

BPO, IBM, RBS, Far East Promotions,

7 21524

what is use#in c

3 3963

how to connect oracle in C/C++.

TCS, Wipro,

3 6796

How to use c/c++ code in JAVA

CDAC, IBM, Satyam, Scope International,

10 13788

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

TCS,

1 5021


Post New C Questions






Un-Answered Questions { C }

write a program to reverse a every alternetive words in a string in a place. EX: Input is "this is the line of text" Output should be "shit is eht line fo text" Please any one tell me code for that.

873


WRITE A PROGRAM TO MERGE TWO SORTED ARRAY USING MERGE SORT TECHNIQUE..

861


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

1564


.find the output of the following program? char*myfunc(char*ptr) { ptr +=3; return (ptr); } int main() { char*x,*y; x="HELLO"; y=myfunc(x); printf("y = %s ",y); return 0; }

234


regarding pointers concept

847






what is associativity explain what is the precidence for * and & , * and ++ how the folloing declaration work 1) *&p; 2) *p++;

1149


What is ambagious result in C? explain with an example.

1162


what is use of malloc and calloc?

704


FILE PROGRAMMING

1062


Create a structure to specify data on students given below: Roll number, Name, Department, Course, Year of joining Assume that there are not more than 450 students in the college. 1.write a function to print names of all students who joined in a particular year 2.write a function to print the data of a student whose roll number is given

1179


How to delete a node from linked list w/o using collectons?

1415


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

898


i got 75% in all semester am i eligible for your company

1072


why we wont use '&' sing in aceesing the string using scanf

1093


What is C language ?

836