C Interview Questions
Questions Answers Views Company eMail

What is the difference between macros and inline functions?

Global Edge, L&T,

5 10361

what is the output of the code and how? main() { int *ptr,x; x=sizeof(ptr); printf("%d",x); }

1 3115

How to write in a function declaration and in function call in which the function has 'n' number of varible or arguments?

2 3574

What is Generic pointer? What is the purpose of Generic pointer? Where it is used?

3 4648

what is the answer for it main() { int i; clrscr(); printf("%d",&i)+1; scanf("%d",i)-1; }

3 4474

Write a C/C++ program that connects to a MySQL server and checks intrusion attempts every 5 minutes. If an intrusion attempt is detected beep the internal speaker to alert the administrator. A high number of aborted connects to MySQL at a point in time may be used as a basis of an intrusion.

Drona Solutions, Infosys, Vodafone, Webyog,

2 10243

write a programe to find the factorial of given number using recursion

3 6441

write a programme to enter some number and find which number is maximum and which number is minimum from enterd numbers.

3 3872

FIND THE OUTPUT IF THE INPUT IS 5 5.75 void main() { int i=1; float f=2.25; scanf("%d%f",&i,&f); printf("%d %f",,i,f); } ANSWER IS 5 AND 2.25 WHY?

Wipro,

4 5379

void main() { char c; while(c=getchar()!='\n') printf("%d",c); } o/p=11 why?

Wipro,

8 10834

if we take a number as a char then can we manipulate(add, subtract) on this number

2 3272

In which category does main function belong??

5 5408

4) Write a program that takes a 5 digit number and calculates 2 power that number and prints it.

5 6562

what is an inline fuction??

2 3506

find the value of y y = 1.5x+3 for x<=2 y = 2x+5 for x>2

TCS,

1519


Post New C Questions

Un-Answered Questions { C }

How was c created?

581


What is difference between scanf and gets?

601


Explain the difference between malloc() and calloc() function?

590


How can a program be made to print the name of a source file where an error occurs?

719


How can I do peek and poke in c?

608






5 Write an Algorithm to find the maximum and minimum items in a set of ā€˜nā€™ element.

1572


What is a scope resolution operator in c?

737


List the different types of c tokens?

607


Compare array data type to pointer data type

592


Where in memory are my variables stored?

621


What is a void * in c?

585


What is the correct declaration of main?

663


Describe explain how arrays can be passed to a user defined function

593


general for is %wd,f-d; in this system "w" means a) 'w' represent total width of digits b) 'w' represent width which includes the digits before,after decimal place and the decimal point c) 'w' represent width which includes the digits before only d) 'w' represent width after decimal place only

576


explain what are actual arguments?

624