C Interview Questions
Questions Answers Views Company eMail

what is output of the following statetment?Printf(“%x”, -1<<4); ?

5 7449

will the program compile? int i; scanf(“%d”,i); printf(“%d”,i);

3 4262

write a string copy function routine?

2 4034

swap two integer variables without using a third temporary variable?

Persistent,

6 8217

how do you redirect stdout value from a program to a file?

1 2870

write a program that finds the factorial of a number using recursion?

Infosys, TATA,

13 29814

write a “Hello World” program in “c” without using a semicolon?

CTS, TCS, Wipro,

9 11935

Give a method to count the number of ones in a 32 bit number?

4 4363

write a program that print itself even if the source file is deleted?

2 6936

Given an unsigned integer, find if the number is power of 2?

5 7059

what is the difference between these initializations? Char a[]=”string”; Char *p=”literal”; Does *p++ increment p, or what it points to?

4 6304

differentiate between const char *a; char *const a; and char const *a;

College School Exams Tests, HCL, TCS,

2 6499

Why cann't whole array can be passed to function as value.

1 3158

Given a single Linked list with lakhs of nodes and length unknown how do you optimally delete the nth element from the list?

Oracle,

1 3845

What is the relation between # and include

HCL,

5 7173


Post New C Questions

Un-Answered Questions { C }

What is the difference between printf and scanf )?

595


List the different types of c tokens?

628


Where are the auto variables stored?

626


What is the sizeof () operator?

624


Why clrscr is used after variable declaration?

1041






What is malloc() function?

638


What is the process to generate random numbers in c programming language?

610


`write a program to display the recomended action depends on a color of trafic light using nested if statments

1633


Which one to choose from 'initialization lists' or 'assignment', for the use in the constructor?

570


What are the main characteristics of c language describe the structure of ac program?

613


FILE *fp1,*fp2; fp1=fopen("one","w") fp2=fopen("one","w") fputc('A',fp1) fputc('B',fp2) fclose(fp1) fclose(fp2)} a.error b. c. d.

1202


Why do we use int main?

610


How do I read the arrow keys? What about function keys?

616


differentiate built-in functions and user – defined functions.

628


What is difference between structure and union with example?

596