| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| Can you think of a way when a program crashed before
reaching main? If yes how? | | 2 |
| n=7623
{
temp=n/10;
result=temp*10+ result;
n=n/10
}
| Wipro | 4 |
| How can I read a directory in a C program? | Wipro | 1 |
| enum colors {BLACK,BLUE,GREEN}
main()
{
printf("%d..%d..%d",BLACK,BLUE,GREEN);
return(1);
}
| ME | 3 |
| Give the output for the following program.
#define STYLE1 char
main()
{
typedef char STYLE2;
STYLE1 x;
STYLE2 y;
clrscr();
x=255;
y=255;
printf("%d %d\n",x,y);
}
| ADITI | 1 |
| write a program in 'c' to find the value of p[i+1]^n.p,i,n
are arguments of a macro and n is a integer | | 1 |
| Every time i run a c-code in editor,
getting some runtime error and editor is disposing,
even after reinstalling the software
what may be the problem? | | 2 |
| Can u return two values using return keyword? If yes, how?
If no, why? | | 7 |
| How to find the given no is odd or even without checking of
any condition and loops. (Hint: Using array) | | 4 |
| What is the diffrent between while and do while statement ? | | 5 |
| write a function which accept two numbers from main() and
interchange them using pointers? | | 3 |
| Find the middle node in the linked list??
(Note:Do not use for loop, count and count/2) | Subex | 2 |
| C program code
int zap(int n)
{
if(n<=1)then zap=1;
else zap=zap(n-3)+zap(n-1);
}
then the call zap(6) gives the values of zap
[a] 8 [b] 9 [c] 6 [d] 12 [e] 15
| Wipro | 4 |
| what is const volatile? | | 1 |
| write a program for even numbers? | | 8 |
| How to add two numbers with using function?
| | 3 |
| find second largest element in array w/o using sorting
techniques? use onle one for loop. | Zycus-Infotech | 2 |
| what is the return value (status code) of exit() function....
what the arguments(integer value) passed to it means.... | TCS | 1 |
| 2.Given the short c program that follows
a. make a list of the memory variables in this program
b.which lines of code contain operations that change the
contents of memory? what are those operations?
Void main( void)
{
Double base;
Double height;
Double area;
Printf(“enter base and height of triangle :”);
Scanf(“%lg”, &base);
Scanf(“%lg”, &height);
Area=base*height/2.0;
Printf(“the area of the triangle is %g \n”,area);
}
| Wipro | 1 |
| How can draw a box in cprogram without using graphics.h
header file & using only one printf(); ? | NIIT | 1 |
| |
| For more C Interview Questions Click Here |