C Interview Questions
Questions Answers Views Company eMail

What is the difference between a structure and a union?

2 481

How can you dynamically allocate memory in C?

2 344

What are macros in C?

2 304

What is a segmentation fault?

2 386

What is the use of the sizeof operator?

2 428

Explain the difference between fopen() and freopen().

2 372

What is the difference between calloc() and realloc()?

1 339

Explain #pragma in C.

1 299

What are dangling pointers?

1 324

What is undefined behavior?

1 356

What is the use of the restrict keyword?

1 288

What is an lvalue and an rvalue?

1 331

Can a program have multiple main() functions?

1 376

What is the output of printf("%d", printf("Hello"));?

1 350

Why is C called a middle-level language?

1 284


Post New C Questions

Un-Answered Questions { C }

What is the difference between mpi and openmp?

992


What is the use of volatile?

823


What is data structure in c programming?

800


Explain what are the advantages and disadvantages of a heap?

848


The program will first compute the tax you owe based on your income. User is prompted to enter income. Program will compute the total amount of tax owed based on the following: Income Tax 0 - $45,000 = 0.15 x income $45,001 - $90,000 = 6750 + 0.20 x (income – 45000) $90,001 - $140,000 = 15750 + 0.26 x (income – 90000) $140,001 - $200,000 = 28750 + 0.29 x (income – 140000) Greater than $200,000 = 46150 + 0.33 x (income – 200000) Dollar amounts should be in dollars and cents (float point numbers with two decimals shown). Tax is displayed on the screen.

1291


Write a program for finding factorial of a number.

844


Lists the benefits of c programming language?

816


Explain what is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?

834


What is dangling pointer in c?

814


Explain logical errors? Compare with syntax errors.

822


Explain is it valid to address one element beyond the end of an array?

945


Explain data types & how many data types supported by c?

817


How can I use a preprocessorif expression to ?

787


What's the best way of making my program efficient?

825


What is the sizeof () operator?

788