C Interview Questions
Questions Answers Views Company eMail

Write a routine that prints out a 2-D array in spiral order!

Lucent,

1 7293

what is a far pointer

ABB, DRDO, ITI, Maruti Suzuki, Steel Plant, TCS, Toyota, Vivo Mobiles,

12 36676

Write a program to compare two strings without using the strcmp() function

Accenture, Arba Minch University,

42 123736

what is the difference between const char *p, char const *p, const char* const p

Accenture, Aricent, CTS, Geometric Software, Point Cross, Verizon,

5 49922

Write a program to interchange two variables without using the third variable?

Accenture, College School Exams Tests, Infotech,

17 38949

What is the output of the program given below #include main() { char i=0; for(;i>=0;i++) ; printf("%d\n",i); }

ADITI, Student, TCS,

21 34344

What is the output of the following program #include main() { int i=0; fork(); printf("%d",i++); fork(); printf("%d",i++); fork(); wait(); }

ADITI, Adobe,

8 18692

What is the memory allocated by the following definition ? int (*x)[10];

ADITI, Wipro,

4 17283

What is the memory allocated by the following definition ? int (*x)();

ADITI,

2 8383

What is the output for the program given below typedef enum grade{GOOD,BAD,WORST,}BAD; main() { BAD g1; g1=1; printf("%d",g1); }

ADITI,

4 9541

Give the output for the following program. #define STYLE1 char main() { typedef char STYLE2; STYLE1 x; STYLE2 y; clrscr(); x=255; y=255; printf("%d %d\n",x,y); }

ADITI,

2 6770

#ifdef TRUE int I=0; #endif main() { int j=0; printf("%d %d\n",i,j); }

ADITI,

3 7797

What is the output for the following program #include main() { char a[5][5],flag; a[0][0]='A'; flag=((a==*a)&&(*a==a[0])); printf("%d\n",flag); }

ADITI, Wipro,

5 9724

HOW DO YOU HANDLE EXCEPTIONS IN C?

AppLabs,

2 6697

WHAT IS THE DIFFERENCE BETWEEN malloc() and calloc() in c file management?

3D PLM, Code Studio, Deltech, IBM,

28 84065


Post New C Questions

Un-Answered Questions { C }

List some of the static data structures in C?

988


How can I swap two values without using a temporary?

870


What is array in C

952


What is difference between class and structure?

875


Why is %d used in c?

779


What is a ternary operator in c?

886


Write a program for Overriding.

951


main(){char *str;scanf("%s",str);printf("%s",str); }The error in the above program is: a) Variable 'str' is not initialised b) Format control for a string is not %s c) Parameter to scanf is passed by value. It should be an address d) none

1074


Explain what is a 'locale'?

826


What is echo in c programming?

781


What is the purpose of 'register' keyword?

911


Differentiate abs() function from fabs() function.

819


What is unary operator?

885


FILE PROGRAMMING

2027


Explain is it better to bitshift a value than to multiply by 2?

970