C Interview Questions
Questions Answers Views Company eMail

In which area global, external variables are stored?

3 4639

what is inline function?

2 2745

why program counter is 16 bit?

3 3034




void main() { int a=1; printf("%d %d %d",a,++a,a++); } the output is supposed to be 1 2 2....but it is 3 3 1 this is due to calling conventions of C. if anyone can explain me how it happens?

7 16106

can we define a function in structure?

2 3727

can we declare a function in side the structure?

HCL,

2 2350

can we initialize all the members of union?

2 4878

what is the structure pointer?

Accenture, HCL,

937




where do we use volatile keyword?

1 2332

Find greatest of two numbers using macro

Siemens, Bosch,

4 28956

what will be the output of this program........ main() { int a=2,b=4,c=6; printf("%d"); } why it gives the value of third variable.

HCL,

6 3366

increment operateor (++)and decrament(--) #include #inclide main() { int x=15; while(x!=0) scanf("%d",&x); {

Syntel, HCL, TCS,

2 2947

Describe for loop and write a c program to sum the series X + x2/2! + x3 /3! + …….. up to fifteen terms.

2 8368

Develop a flow chart and write a c program to find the roots of a quadratic equation ax2+bx+c=0 using switch and break statement.

TCS,

1 9889

Can you write the algorithm for Queue?

TCS, College School Exams Tests,

813


Post New C Questions






Un-Answered Questions { C }

Iam a B.Tech graduate and completed my engineering in 2009, from 2005 to 2009 and after that i had done nothing.Now i want to do job and get into BPO field . Friends give me suggestions as what to say in interview... if they ask me that what would you had done ... these many years without doing job ??????? pls urgent

675


If a five digit number is input through the keyboard, write a program to print a new number by adding one to each of its digits.For example if the number that is input is 12391 then the output should be displayed as 23402

1927


I need previous papers of CSC.......plz help out by posting them.......

971


find out largest elemant of diagonalmatrix

852


hi any body pls give me company name interview conduct "c" language only

834






to find the closest pair

1025


Is Exception handling possible in c language?

830


Write a C program linear.c that creates a sequence of processes with a given length. By sequence it is meant that each created process has exactly one child. Let's look at some example outputs for the program. Here the entire process sequence consists of process 18181: Sara@dell:~/OSSS$ ./linear 1 Creating process sequence of length 1. 18181 begins the sequence. An example for a sequence of length three: Sara@dell:~/OSSS$ ./linear 3 Creating process sequence of length 3. 18233 begins the sequence. 18234 is child of 18233 18235 is child of 18234 ........ this is coad .... BUt i could not compleate it .....:( #include #include #include #include int main(int argc, char *argv[]) { int N; pid_t pid; int cont; if (argc != 2) { printf("Wrong number of command-line parameters!\n"); return 1; } N = atoi(argv[1]); printf("Creating process sequence of length %d.\n",N); printf("%d begins the sequence.\n",getpid()); /* What I have to do next ?????? */ }

867


4-Take two sets of 5 numbers from user in two arrays. Sort array 1 in ascending and array 2 in descending order. Perform sorting by passing array to a function mySort(array, sortingOrder). Then multiply both the arrays returned from function, using metric multiplication technique in main. Print result in metric format.

859


hi to every one .. how to view table pool after creating the pooled table? plz help me.. if any knows abt this ..

688


How to write a code for implementing my own printf() and scanf().... Please hep me in this... I need a guidance... Can you give an coding for c... Please also explain about the header files used other than #include...

3789


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]

1175


char *p="name"; printf(p);

672


Write a program to display all the prime nos from 1 to 1000000, your code should not take time more than a minute to display all the nos.

876


write an algorithm to display a square matrix.

1373