C Interview Questions
Questions Answers Views Company eMail

1)what is the error in the following stmt where str is a char array and the stmt is supposed to traverse through the whole character string str? for(i=0;str[i];i++) a)There is no error. b)There shud be no ; after the stmt. c)The cond shud be str[i]!='\0' d)The cond shud be str[i]!=NULL e)i shud be initialized to 1

4 2411

main() { enum{red,green,blue=6,white}; pf("%d%d%d%d", red,green,blue,white); return 0; } a)0 1 6 2 b)0 1 6 7 c)Compilation error d)None of the above

6 4645

4)What would be the output? main() { int num=425; pf("%d",pf("%d",num)); } a)Comp error b)4425 c)4253 d)3435 e)none

10 4945




6)What would be the output? main() { int u=1,v=3; pf("%d%d",u,v); funct1(&u,&v); pf("%d%d\n",u,v); } void funct1(int *pu, int *pv) { *pu=0; *pv=0; return; } a)1 3 1 3 b)1 3 1 1 c)1 3 0 0 d)1 1 1 1 e) 3 1 3 1

4 3744

what wud be the output? main() { char *str[]={ "MANISH" "KUMAR" "CHOUDHARY" }; printf("\nstring1=%s",str[0]); printf("\nstring2=%s",str[1]); printf("\nstring3=%s",str[2]); a)string1=Manish string2=Kumar string3=Choudhary b)string1=Manish string2=Manish string3=Manish c)string1=Manish Kumar Choudhary string2=(null) string3=(null) d)Compiler error

Infosys,

9 4513

what will be the output of this program main() { int i=1; while (i<=10); { i++; } }

11 5640

main() { char x; while(x=0;x<=255;x++) printf("\nAscii value %d Charater %c",x,x); }

2 4639

main() { charx; while (x=0;x<=255;x++) printf("\nAscii value %d Character %c,x,x); }

2 5269




main() { intj; while9j<=10) { printf("\n%d",j); j=j+1; } }

4 3185

how to find the sizof of any datatype using bit manipulations

3 2486

How do I declare an array of N pointers to functions returning pointers to functions returning pointers to characters?

Wipro, CMC,

2 4721

SIR PLS TELL ME THE CODE IN C LANGUAGE TO PRINT THE FOLLOWING SERIES 1 1 2 1 1 2 3 2 1 1 2 3 4 3 2 1 1 2 3 2 1 1 2 1 1

4 3094

what is the output of the program?? #include main ( ) { int a=010,sum=0,tracker: for(tracker=0;tracker<=a;tracker++) sum+=tracker; printf(ā€œ %d\nā€,sum); } what is the difference between a=10 and a=010??

Oracle,

3 8223

write a program for 4 4 3 3 3 3 2 2 2 2 2 2 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 2 2 2 2 2 2 3 3 3 3 4 4

1 1714

program to find out date after adding 31 days to a date in the month of febraury also consider the leap year

1804


Post New C Questions






Un-Answered Questions { C }

i have to apply for rbi before that i need to know the the syllabus for the entrance questions. whethet it may be aps or techinical

877


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

803


What is the difference between specifying a constant variable like with constant keyword and #define it? i.e what is the difference between CONSTANT FLOAT A=1.25 and #define A 1.25

784


how to write optimum code to divide a 50 digit number with a 25 digit number??

2026


i want to know the procedure of qualcomm for getting a job through offcampus

1285






difference between object file and executable file

4418


what is the significance of static storage class specifier?

938


WHAT IS THE DEFINATION OF IN TECHNOLOGY AND OFF TECHNOLOGY ?

1180


GIVEN A FLOATING POINT NUMBER HOW IS IT ACTUALLY STORED IN MEMORY ? CAN ANYONE EXPLAIN?? THE 32 BIT REPRESENTATION OF A FLOATING POINT NUMBER ALLOTS: 1 BIT-SIGN 8 BITS-EXPONENT 23 BITS-MANTISSA

762


When I tried to go into a security sites I am denied access and a message appeared saying 'applet not initialize'. How can I rectify this problem.

787


write a c program thal will find all sequences of length N that produce the sum is Zero, print all possible solutions?

1722


please send me the code for multiplying sparse matrix using c

1080


illustrate the use of address operator and dereferencing operator with the help of a program guys plzzz help for this question

840


Write a C program that will accept a hexadecimal number as input and then display a menu that will permit any of the following operations to be carried out: Display the hexadecimal equivalent of the one's complement. (b) Carry out a masking operation and then display the hexadecimal equivalent of the result. (c) Carry out a bit shifting operation and then display the hexadecimal equivalent of the result. (d) Exit. If the masking operation is selected, prompt the user lor the type of operation (bitwise and, bitwise exclusive or, or bitwise or) and then a (hexadecimal) value for the mask. If the bit shifting operation is selected. prompt the user for the type of shift (left or right), and then the number of bits. Test the program with several different (hexadecimal) input values of your own choice.

3771


what is the differnce between programing langauge and tool? is sas is a programing langauge r tool?

1159