C Interview Questions
Questions Answers Views Company eMail

What is the difference between macros and inline functions?

Global Edge, L&T,

5 7089

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

1 1789

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

2 2058

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

3 2662

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

3 2538

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 8385

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

3 4166

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

3 2119

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 2708

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


8 6358

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

2 1749

In which category does main function belong??

5 3061

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

5 3485

what is an inline fuction??

2 2055

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 }

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


#define f(g,h) g##h main O int i=0 int var=100 ; print f ("%d"f(var,10));} wat would be the output??


Using functions, write a program that multiplies two arrays. Use the following functions: - Function ReadArray - Function MultiplyArrays - Function DisplayArrays


how logic is used


1) There is a singing competition for children going to be conducted at a local club. Parents have been asked to arrive at least an hour before and register their children’s names with the Program Manager. Whenever a participant registers, the Program Manager has to position the name of the person in a list in alphabet order. Write a program to help the Program Manager do this by placing the name in the right place each time the Program Manger enters a name. 2) the Event Manager has to send participants to the stage to perform in the order in which they registered. Write a program that will help the Event Manager know who to call to the stage to perform. The Logic should be in Data Structures


why programs in c are running with out #include? some warnings are display in terminal but we execute the program we get answer why? eg: main() { printf("hello world "); }




using only #include and #include Write a program in C that will read an input from the user and print it back to the user if it is a palindrome. The string ends when it encounters a whitespace. The input string is at most 30 characters. Assume the string has no spaces and distinguish between and lowercase. So madam is a palindrome, but MadAm is not a palindrome. Use scanf and %s to read the string. Sample Test: Enter a string: madam madam is a palindrome. Enter a string: 09023 09023 is not a palindrome.


a number whose only prime factors are 2,3,5, and 7 is call humble number,,write a program to find and display the nth element in this sequence.. sample input : 2,3,4,11,12,13, and 100.. sample output : the 2nd humble number is 2,the 3rd humble number is 3,the 4th humble number is ,the 11th humble number is 12, the 12th humble number is 14, the 13th humble number is 15, the 100th humble number is 450.


In cryptography, you could often break the algorithm if you know what was the original (plain) text that was encoded into the current ciphertext. This is called the plain text attack. In this simple problem, we illustrate the plain text attack on a simple substitution cipher encryption, where you know each letter has been substituted with a different letter from the alphabet but you don’t know what that letter is. You are given the cipherText as the input string to the function getwordSets(). You know that a plain text "AMMUNITION" occurs somewhere in this cipher text. Now, you have to find out which sets of characters corresponds to the encrypted form of the "AMMUNITION". You can assume that the encryption follows simple substitution only. [Hint: You could use the pattern in the "AMMUNITION" like MM occurring twice together to identify this]


I have written a pro*C program to fetch data from the cursor. where in i have used the concept of BULK FETCH.... each FETCH statement is taking lots of time to fetch specified number of rows at...


Write an algorithm for implementing insertion and deletion operations in a singly linked list using arrays ?


illustrate the use of address operator and dereferencing operator with the help of a program guys plzzz help for this question


How to check whether string is a palindrome, WITHOUT USING STRING FUNCTIONS?


If i have an array 0 to 99 i.e,(Size 100) I place the values 1 to 100 randomly like a[0]=29,a[1]=56 upto array[99].. the values are only between 1 to 100. getting the array values by using scanf.. If i entered one wrong element value line a[56]=108. how can i find it.. and also how to find the missing value in 1 to 100.. and i want to replace the missing values.. any one of them know please post your answer..