| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| what does data structure mean? | | 7 |
| what is the difference between arrays and linked list | Tech-Mahindra | 15 |
|
main()
{
int x=10,y=15;
x=x++;
y=++y;
printf("%d %d\n",x,y);
}
output?? | Ramco | 13 |
| what is the differance between pass by reference and pass
by value. | Infosys | 4 |
| Write a program to generate prime factors of a given integer? | | 1 |
| Why preprocessor should come before source code?
| | 2 |
| What's the difference between calloc() and malloc()? | | 3 |
| N O S I E R
+ A S T R A L
----------------
7 2 5 6 1 3 | Honeywell | 2 |
| what is the output?
#define fun(a,b,t) (g ##t=(a),(a)=(b),(b)=g##t)
float gfloat;
main()
{
float a=1.12,b=3.14;
fun (a,b,float);
printf("na=%4.2f,b=%4.2f",a,b);
}
A)Error in Defining Macro
B)a=1.12,b=3.14
C)a=3.14,b=1.12
D)None of the Above
| Accenture | 2 |
| do ne body have any idea about the salary for the we r going
to have interview.
yup .. u got it right ..i m talking abt NIC. | | 1 |
| regarding the scope of the varibles;identify the incorrect
statement:
a.automatic variables are automatically initialised to 0
b.static variables are are automatically initialised to 0
c.the address of a register variable is not accessiable
d.static variables cannot be initialised with any expression
| TCS | 1 |
| What does a run-time "null pointer assignment" error mean? | | 2 |
| what is the maximum no. of bytes calloc can allocate | Mphasis | 2 |
| Which of the following is not an infinite loop ?
a.while(1){
....
}
b.for(;;){
...
}
c.x=0;
do{
/*x unaltered within theloop*/
...
}while(x==0);
d.# define TRUE 0
...
while(TRUE){
....
}
| TCS | 4 |
| IS STRUCTURES CAN BE USED WITHIN AN ARRAY? | Caritor | 7 |
| Total of how many functions are available in c? | | 2 |
| what is difference between ++(*p) and (*p)++ | Accenture | 15 |
| In the following code segment what will be the result of the
function,
value of x , value of y
{
unsigned int x=-1;
int y;
y = ~0;
if(x == y)
printf("same");
else
printf("not same");
}
a) same, MAXINT, -1
b) not same, MAXINT, -MAXINT
c) same , MAXUNIT, -1
d) same, MAXUNIT, MAXUNIT
e) not same, MAXINT, MAXUNIT
| IBM | 1 |
| different between overloading and overriding | | 3 |
| a.One Cannot Take the address of a Bit Field
b.bit fields cannot be arrayed
c.Bit-Fields are machine Dependant
d.Bit-fields cannot be declared as static
Which of the Following Statements are true w.r.t Bit-Fields
A)a,b&c B)Only a & b C)Only c D)All
| Accenture | 2 |
| |
| For more C Interview Questions Click Here |