| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| What is structure packing ? | HP | 1 |
| biggest of two no's with out using if condition statement | | 2 |
| what is the use of using linked list and array? | Infosys | 8 |
| the operator for exponencation is
a.**
b.^
c.%
d.not available
| TCS | 4 |
| What is macro? | IBM | 3 |
| What is the output of the program given below
#include<stdio.h>
main()
{
char i=0;
for(;i>=0;i++) ;
printf("%d\n",i);
} | ADITI | 11 |
| How can I prevent other programmers from violating
encapsulation by seeing the private parts of my class? | | 1 |
| There is a 100-story building and you are given two eggs.
The eggs (and the building) have an interesting property
that if you throw the egg from a floor number less than X,
it will not break. And it will always brake if the floor
number is equal or greater than X. Assuming that you can
reuse the eggs which didn't broke; you got to find X in a
minimal number of throws. Give an algorithm to find X in
minimal number of throws. | | 2 |
| Convert the following expression to postfix and prefix
(A+B) * (D-C) | | 1 |
| write a Program to dispaly upto 100 prime numbers(without
using Arrays,Pointer) | Wipro | 5 |
| How can I find out how much memory is available? | Persistent | 1 |
| write a program to print sum of each row of a 2D array.
| | 2 |
| #define MAX(x,y) (x) > (y) ? (x) : (y)
main()
{
int i = 10, j = 5, k = 0;
k = MAX(i++, ++j);
printf("%d %d %d", i,j,k);
}
what will the values of i , j and k?
}
| NDS | 9 |
| N O S I E R
+ A S T R A L
----------------
7 2 5 6 1 3 | Honeywell | 1 |
| How do you write a program which produces its own source
code as its output? | | 2 |
| #include<stdio.h>
main()
{
char s1[]="Ramco";
char s2[]="Systems";
s1=s2;
printf("%s",s1);
}
Find the output | CitiGroup | 4 |
| if a five digit number is input through the keyboard, write
a program to calculate the sum of its digits.
(hint:-use the modulus operator.'%') | | 5 |
| Difference between fopen() and open()? | Aricent | 1 |
| what is compiler | | 5 |
| what is the differnce between AF_INET and PF_INET? | Wipro | 1 |
| |
| For more C Interview Questions Click Here |