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 16049

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

Ramco,

9 15616

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

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

Ramco,

4 8206

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

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

EBS, Ramco, Sangwin, TCS,

19 54195

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

Ramco,

7 10828

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

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

Ramco, TCS,

6 8250

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

3 5094

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

BPO, Far East Promotions, IBM, RBS,

7 25659

what is use#in c

3 5559

how to connect oracle in C/C++.

TCS, Wipro,

3 8816

How to use c/c++ code in JAVA

CDAC, IBM, Satyam, Scope International,

10 18385

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

TCS,

1 6269


Post New C Questions

Un-Answered Questions { C }

What are the different categories of functions in c?

640


What are global variables and explain how do you declare them?

569


Is c object oriented?

536


write a program that declares an array of 30 elements named "income" in the main functions. then cal and pass the array to a programmer-defined function named "getIncome" within the "getIncome" function, ask the user for annual income of 30 employees. then calculate and print total income on the screen using the following function: "void getIncome ( ai []);

1840


How pointers are declared?

558






C program to find all possible outcomes of a dice?

1851


write a program to copy the string using switch case?

2397


What is function definition in c?

583


What are the applications of c language?

621


Is main is user defined function?

589


Hello. How to write a C program to check and display president party like if i type in the console "biden" and hit enter the output shoud be : "biden is democrat" and if i type "trump" and hit enter the output shoud be: "trump is republican"

1580


What are the advantages and disadvantages of c language?

556


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

2085


In which language linux is written?

596


Explain how do you print only part of a string?

646