C Interview Questions
Questions Answers Views Company eMail

#define f(g,h) g##h main O int i=0 int var=100 ; print f ("%d"f(var,10));} what would be the output?

Wipro,

1 4551

Write a C++ program without using any loop (if, for, while etc) to print prime numbers from 1 to 100 and 100 to 1 (Do not use 200 print statements!!!)

Cap Gemini, HCL,

2 6307

why do we use # in c-language?

1 3336

what is the difference between class and unio?

HCL, Wipro,

1850

int main() { int i=-1,j=-1;k=0,l=2,m; m=i++&&j++&&k++||l++; printf("%d%d%d%d%d",i,j,k,l,m); }

HCL,

3 7550

To print the pattern 1 2 3 4 5 10 17 18 19 6 15 24 25 20 7 14 23 22 21 8 13 12 11 10 9

HCL,

2175

for(;;) printf("C language") What is out put of above??

Practical Viva Questions,

2 3099

Heyyy All, Just a challenge . A C program with if Else if(){ /// insert sumthing print ("in if") // insert sumting } else { ///// insert sumthing print ("in else"); //// insert sumthing } can anyone modify it so that program prints. if and else both

3 3484

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

Facebook,

2 5166

output for following code??? main() { int x=2,y,z; x*=3+2; printf("1.%d\n",x); x*=y=z=4; printf("2.%d %d %d\n",x,y,z); x=y==z; printf("3.%d\n",x); x==(y=z); printf("%d",x); }

Elysium,

2 3339

Write a c program for sum of first n terms of the series S = 1 - (1/3) + (1/5) -(1/7) + (1/9) ......

2 4577

Sir i need notes for structure,functions,pointers in c language can you help me please

TCS,

1937

How we can set and clear bit in a byte using macro function?

L&T, Samsung,

2 19123

How we can write a value to an address using macro..?

Tata Elxsi,

2892

#define FALSE -1 #define TRUE 1 #define NULL 0 main() { if(NULL) puts("NULL"); else if(FALSE) puts("TRUE"); else puts("FALSE"); }

1 8038


Post New C Questions

Un-Answered Questions { C }

How can I do serial ("comm") port I/O?

677


I have seen function declarations that look like this

587


Can a pointer point to null?

578


Why do we need volatile in c?

733


The statement, int(*x[]) () what does in indicate?

635






What is data structure in c language?

592


Are the variables argc and argv are local to main?

778


Which is the best website to learn c programming?

567


What is difference between structure and union?

587


Was 2000 a leap year?

616


What is const and volatile in c?

557


can any one tel me wt is the question pattern for NIC exam

1549


How can you determine the size of an allocated portion of memory?

732


What is a nested formula?

591


What is class and object in c?

577