C Interview Questions
Questions Answers Views Company eMail

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

Lucent,

1 7259

what is a far pointer

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

12 36497

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

Accenture, Arba Minch University,

42 123227

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

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

5 49828

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

Accenture, College School Exams Tests, Infotech,

17 38661

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 34085

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 18570

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

ADITI, Wipro,

4 17204

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

ADITI,

2 8348

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 9456

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 6738

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

ADITI,

3 7736

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 9643

HOW DO YOU HANDLE EXCEPTIONS IN C?

AppLabs,

2 6636

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

3D PLM, Code Studio, Deltech, IBM,

28 83754


Post New C Questions

Un-Answered Questions { C }

What does node * mean?

968


Explain bit masking in c?

912


Program to find the sum of digits of a given number until the sum becomes a single digit. (e.g. 12345=>1+2+3+4+5=15=>1+5=6)

922


count = 0; for (i = 1;i < = 10; i++);count = count + i; Value of count after execution of the above statements will be a) 0 b) 11 c) 55 d) array

886


What is double pointer in c?

773


Explain the difference between ++u and u++?

845


Can we change the value of constant variable in c?

823


Explain the use of keyword 'register' with respect to variables.

816


How can I do peek and poke in c?

851


Is python a c language?

782


can we change the default calling convention in c if yes than how.........?

2295


What is the difference between exit() and _exit() function?

800


What are identifiers in c?

907


What is the use of a semicolon (;) at the end of every program statement?

1148


How can you tell whether two strings are the same?

1039