| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| fun(int x)
{
if(x > 0)
fun(x/2);
printf("%d", x);
}
above function is called as:
fun(10);
what will it print?
} | NDS | 13 |
| size maximum allocated by calloc() | DELL | 1 |
| write a program to display the array elements in reverse
order in c language | | 6 |
| design and implement a program that reads floating-points
numbers in a sentinel-controlled loop until the user
terminates the program by entering zero.your program should
determinate and print the smallest,largest and average of
the supplied numbers. | | 1 |
| program to find the roots of a quardratic equation | | 1 |
| int arr[] = {1,2,3,4}
int *ptr=arr;
*(arr+3) = *++ptr + *ptr++;
Final contents of arr[]
| Hughes | 4 |
| How do I declare a pointer to an array? | | 5 |
| What is an object?
| | 3 |
| HOW CAN ADD OUR FUNCTION IN LIBRARY. | | 5 |
| #include
main()
{
int i=1,j=2;
switch(i)
{
case 1: printf("GOOD");
break;
case j: printf("BAD");
break;
}
}
| ME | 5 |
| 18)struct base {int a,b;
base();
int virtual function1();
}
struct derv1:base{
int b,c,d;
derv1()
int virtual function1();
}
struct derv2 : base
{int a,e;
}
base::base()
{
a=2;b=3;
}
derv1::derv1(){
b=5;
c=10;d=11;}
base::function1()
{return(100);
}
derv1::function1()
{
return(200);
}
main()
base ba;
derv1 d1,d2;
printf("%d %d",d1.a,d1.b)
o/p is
a)a=2;b=3;
b)a=3; b=2;
c)a=5; b=10;
d)none
19) for the above program answer the following q's
main()
base da;
derv1 d1;
derv2 d2;
printf("%d %d %d",da.function1(),d1.function1(),d2.function1
());
o/p is
a)100,200,200;
b)200,100,200;
c)200,200,100;
d)none
20)struct {
int x;
int y;
}abc;
you can not access x by the following
1)abc-->x;
2)abc[0]-->x;
abc.x;
(abc)-->x;
a)1,2,3
b)2&3
c)1&2
d)1,3,4
| | 1 |
| hat is a pointer? | Assurgent | 3 |
| how to implement stack work as a queue? | | 2 |
| what is the difference between #include<stdio.h> and
#include "stdio.h" ? | | 2 |
|
main()
{
int x=10,y=15;
x=x++;
y=++y;
printf("%d %d\n",x,y);
}
output?? | Ramco | 13 |
| What are advantages and disadvantages of recursive
calling ? | HP | 11 |
| what is the output for the code :
main()
{
int i,j;
printf("%d %d ",scanf("%d%d",&i,&j));
} | Infosys | 15 |
| If we give two names then this displays the connection
between the two people. It is nothing but flames game | | 1 |
| 1.write a program to merge the arrays
2.write efficient code for extracting unique elements from a
sorted list of array? | Qualcomm | 2 |
| When is an interface "good"?
| | 1 |
| |
| For more C Interview Questions Click Here |