C Interview Questions
Questions Answers Views Company eMail

the operator for exponencation is a.** b.^ c.% d.not available

TCS,

5 5189

what is y value of the code if input x=10 y=5; if (x==10) else if(x==9) elae y=8; a.9 b.8 c.6 d.7

TCS,

4 7398

what does the following code do? fn(int n,int p,int r) { static int a=p; switch(n){ case 4:a+=a*r; case 3:a+=a*r; case 2:a+=a*r; case 1:a+=a*r; } } a.computes simple interest for one year b.computes amount on compound interest for 1 to 4 years c.computes simple interest for four year d.computes compound interst for 1 year

TCS,

7 6429




a=0; while(a<5) printf("%d\n",a++); how many times does the loop occurs? a.infinite b.5 c.4 d.6

TCS,

7 8154

how many times does the loop iterated ? for (i=0;i=10;i+=2) printf("Hi\n");

TCS,

9 11133

which of the following go out of the loopo if expn 2 becoming false a.while(expn 1){...if(expn 2)continue;} b.while(!expn 1){if(expn 2)continue;...} c.do{..if(expn 1)continue;..}while(expn 2); d.while(!expn 2){if(expn 1)continue;..}

TCS,

4 4416

pick out the odd one out of the following a.malloc() b.calloc() c.free() d.realloc()

TCS, ZenQ,

2 8880

# define prod(a,b)=a*b main() { int x=2; int y=3; printf("%d",prod(x+2,y-10)); } the output of the program is a.8 b.6 c.7 d.none

Microsoft, TCS,

7 11568




consider the following program sigment int n,sum=1; switch(n) { case 2:sum=sum+2; case 3:sum*=2; break; default:sum=0;} if n=2, what is the value of sum a.0 b.6 c.3 d.none

TCS,

7 7588

the format specified for hexa decimal is a.%d b.%o c.%x d.%u

TCS,

7 6149

find the output of the following program main() { int x=5, *p; p=&x; printf("%d",++*p); }

TCS, Amdocs,

10 16015

consider the following C code main() { int i=3,x; while(i>0) { x=func(i); i--; } int func(int n) { static sum=0; sum=sum+n; return(sum); } the final value of x is

TCS,

4 6191

int *a[5] refers to

TCS,

12 15562

which of the following statements is incorrect a.typedef struct new{ int n1; char n2; } DATA; b.typedef struct { int n3; char *n4; }ICE; c.typedef union { int n5; float n6; } UDT; d.#typedef union { int n7; float n8; } TUDAT;

Assurgent, TCS,

5 9686

main() { char *p1="Name"; char *p2; p2=(char *)malloc(20); while(*p2++=*p1++); printf("%s\n",p2); } what is the output?

HCL, Ramco, AMCAT, Zycus Infotech,

7 15222


Post New C Questions






Un-Answered Questions { C }

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

2459


what is the c source code for the below output? 5555555555 4444 4444 333 333 22 22 1 1 22 22 333 333 4444 4444 5555555555

1546


write a program to convert a expression in polish notation(postfix) to inline(normal) something like make 723+* (2+3) x 7 (not sure) just check out its mainly printing expression in postfix form to infix.

2495


what is the difference between class and unio?

1095


4-Take two sets of 5 numbers from user in two arrays. Sort array 1 in ascending and array 2 in descending order. Perform sorting by passing array to a function mySort(array, sortingOrder). Then multiply both the arrays returned from function, using metric multiplication technique in main. Print result in metric format.

838






please help me..... please codes and flowchart plz turbo c lang po yan.....please asap response... 3. Make an astrology program. The user types in his or her birthday (month, day, and year as integer), and the program responds with the user’s zodiac sign, horoscope, and other information related to it. If the user’s birth year falls into a leap year, your program should display an appropriate message for it. NOTES: Conditional Statements: it should be with graphics

2090


How to write a code for implementing my own printf() and scanf().... Please hep me in this... I need a guidance... Can you give an coding for c... Please also explain about the header files used other than #include...

3738


disply the following menu 1.Disply 2.Copy 3.Append; as per the menu do the file operations 4.Exit

810


C program to find all possible outcomes of a dice?

1166


program to find error in linklist.(i.e find whether any node point wrongly to previous nodes instead of next node)

894


a) Identify the following declarations. Ex. int i (integer variable) float a[l0](array of 10 real nos) int (*f())() void *f int (*f()) [] void *f int f[] [] [] char *(*f) () int (*f[]) [] float(*f) [] [] float **f int ******f

826


void main(){ int a; a=1; while(a-->=1) while(a-->=0); printf("%d",a); }

408


how much salary u want ? why u join in our company? your domain is core sector why u prefer software ?

723


Device an algorithm for weiler-atherton polygon clipping, where the clipping window can be any specified polygon

4446


Hai,I have done with my bachelor of commerce and planing to ms,please suggest me how to convince vo for shifting from commerce to computers. Visa on 8 DEC 2014  Npu university

850