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?

Wipro,

4 3004

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

Wipro,

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

TCS,

868


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.

803


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

825


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

1005


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.

2016


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

1127






Difference between Shallow copy and Deep copy?

901


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.

798


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

5448


what is use of malloc and calloc?

727


How to implement a packet in C

1662


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

1824


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

784


All technical questions

814


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.

731


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

1212