C Interview Questions
Questions Answers Views Company eMail

What is the difference between macros and inline functions?

Global Edge, L&T,

5 7833

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

1 1995

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

2 2286

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

3 2966

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

3 2862

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.

Infosys, Vodafone, Webyog, Drona Solutions,

2 8718

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

3 4513

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

3 2404

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?


4 3004

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


8 6988

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

2 2014

In which category does main function belong??

5 3388

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

5 3744

what is an inline fuction??

2 2297

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



Post New C Questions

Un-Answered Questions { C }

Write a C/C++ program to add a user to MySQL. The user should be permitted to only "INSERT" into the given database.


what are bit fields? What is the use of bit fields in a structure declaration?


Can you explain what keyboard debouncing is, and where and why we us it? please give some examples


In this assignment you are asked to write a multithreaded program to find the duplicates in an array of 10 million integers. The integers are between -5000,000 to 5000,000 and are generated randomly. Use 10 threads, each thread works on 1000,000 integers. Compare the time needed to accomplish the task with single thread of execution program. Do not include the time to fill the array with integers in the execution time.


write a c program to find the largest and 2nd largest numbers from the given n numbers without using arrays


Difference between Shallow copy and Deep copy?


I need a help with a program: Write a C program that uses data input in determining the whole of points A and a whole of circles B. Find two points in A so that the line which passes through them, cut through the maximum number of circles.


write a program in c language to print your bio-data on the screen by using functions.


what is use of malloc and calloc?


How to implement a packet in C


Stimulate calculator using Switch-case-default statement for two numbers


What is the difference between specifying a constant variable like with constant keyword and #define it? i.e what is the difference between CONSTANT FLOAT A=1.25 and #define A 1.25


All technical questions


Write a program to maintain student’s record. Record should not be available to any unauthorized user. There are three (3) categories of users. Each user has its own type. It depends upon user’s type that which kind of operations user can perform. Their types and options are mentioned below: 1. Admin (Search Record [by Reg. No or Name], View All Records, Insert New Record, Modify Existing Record) 2. Super Admin (Search Record [by Reg. No or Name], View All Records, Insert New Record, Modify Existing Record, Delete Single Record) 3. Guest (Search Record [by Reg. No or Name], View All Records) When first time program runs, it asks to create accounts. Each user type has only 1 account (which means that there can be maximum 3 accounts). In account creation, following options are required: Login Name: <6-10 alphabets long, should be unique> Password: <6-10 alphabets long, should not display characters when user type> Confirm Password: Account Type: Login Name, Password and Account Type should be stored in a separate file in encrypted form. (Encryption means that actual information should be changed and Decryption means that Encrypted information is changed back to the actual information) If any of the above mentioned requirement(s) does not meet then point out mistake and ask user to specify information again. When Program is launched with already created accounts, it will ask for user name and password to authenticate. On successful authentication, give options according to the user’s type.


I was asked to write a program in c which when executed displays how many no.of clients are connected to the server.