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 15860

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

Ramco,

9 15496

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

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

Ramco,

4 8108

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

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

EBS, Ramco, Sangwin, TCS,

19 53690

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

Ramco,

7 10721

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

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

Ramco, TCS,

6 8186

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

3 5041

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

BPO, Far East Promotions, IBM, RBS,

7 25556

what is use#in c

3 5490

how to connect oracle in C/C++.

TCS, Wipro,

3 8752

How to use c/c++ code in JAVA

CDAC, IBM, Satyam, Scope International,

10 18239

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

TCS,

1 6231


Post New C Questions

Un-Answered Questions { C }

Why is sizeof () an operator and not a function?

556


What is the meaning of && in c?

527


what will be the output for the following main() { printf("hi" "hello"); }

9242


What is static memory allocation? Explain

595


What should malloc() do? Return a null pointer or a pointer to 0 bytes?

594






What is the method to save data in stack data structure type?

575


How can you increase the allowable number of simultaneously open files?

569


What is volatile variable in c?

629


A SIMPLE PROGRAM OF GRAPHICS AND THEIR OUTPUT I WANT SEE WAHAT OUTOUT OF GRAPHICS PROGRAM

1668


#include show(int t,va_list ptr1) { int a,x,i; a=va_arg(ptr1,int) printf(" %d",a) } display(char) { int x; listptr; va_star(otr,s); n=va_arg(ptr,int); show(x,ptr); } main() { display("hello",4,12,13,14,44); }

747


What is c mainly used for?

573


Explain the difference between malloc() and calloc() function?

575


What is meant by recursion?

604


What is auto keyword in c?

768


Is sizeof a keyword in c?

555