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 4542

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 6301

why do we use # in c-language?

1 3330

what is the difference between class and unio?

HCL, Wipro,

1846

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 7539

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,

2169

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

Practical Viva Questions,

2 3093

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 3476

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

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 3333

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

2 4559

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

TCS,

1932

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

L&T, Samsung,

2 19115

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

Tata Elxsi,

2889

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

1 8029


Post New C Questions

Un-Answered Questions { C }

What is the role of this pointer?

536


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

1529


Explain what is the general form of a c program?

607


how can i write a program that prints out a box such that whenever i press any key8(coordinate number) on the keyboard, the box moves.

1199


HOW TO SOLVE A NUMERICAL OF LRU IN OS ??????

2250






Explain the Difference between the New and Malloc keyword.

670


What is extern keyword in c?

622


What are the storage classes in C?

614


What does c mean before a date?

573


What could possibly be the problem if a valid function name such as tolower() is being reported by the C compiler as undefined?

724


When c language was developed?

619


What is the difference between ā€˜gā€™ and ā€œgā€ in C?

2479


Is this program statement valid? INT = 10.50;

675


Explain main function in c?

612


What is wild pointer in c with example?

562