C Interview Questions
Questions Answers Views Company eMail

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

TCS,

5 5305

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 7682

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 6649




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 8475

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

TCS,

9 11586

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 4601

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

TCS, ZenQ,

2 9204

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




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 7910

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

TCS,

7 6373

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

Amdocs, TCS,

10 16483

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 6449

int *a[5] refers to

TCS,

12 15962

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 10149

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

HCL, Ramco, Zycus Infotech, AMCAT,

7 15730


Post New C Questions






Un-Answered Questions { C }

Write a program to display all the prime nos from 1 to 1000000, your code should not take time more than a minute to display all the nos.

929


what is the syallabus of computer science students in group- 1?

1127


Why we not create function inside function.

995


string reverse using recursion

1129


Write a C/C++ program to add a user to MySQL. The user should be permitted to only "INSERT" into the given database.

787






to print the salary of an employee according to follwing calculation: Allowances:HRA-20% of BASIC,DA-45% of BASIC,TA-10%. Deductions:EPF-8% of BASIC,LIC-Rs.200/-Prof.Tax:Rs.200/- create c language program?

723


what type of questions arrive in interview over c programming?

902


Write a C Program That Will Count The Number Of Even And Odd Integers In A Set using while loop

1007


given post order,in order construct the corresponding binary tree

1666


Design a program which assigns values to the array temperature. The program should then display the array with appropriate column and row headings.

1040


write a program in C that prompts the user for today's date,tomorrow's date and display the results.Use structures for today's date,tomorrow's date and an array to hold the days for each month of the year.

4140


int i=10; printf("%d %d %d", i, i=20, i);

258


Q.1 write a program to create binary tree 1 to 16 numbers? Q.2 write a program to creat a binary search tree for the member that is given by user?

1359


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

913


code for find determinent of amatrix

726