| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| what r callback function? | | 1 |
| how the size of an integer is decided?
- is it based on processor or compiler or OS? | nvidia | 16 |
| 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 |
| What's a "sequence point"? | | 2 |
| the code is::::: if(condition)
printf("hello");
else
printf("world");
WHAT WILL BE THE CONDITION IN IF IN SUCH A WAY THAT BOTH
HELLO AND WORLD ARE PRINTED IN A SINGLE ATTEMPT?????? SINGLE
ATTEMPT IN THE SENSE... IT MUST FIRST PRINT "HELLO" AND IT
MUST GO TO ELSE PART AND PRINT "WORLD"..... NO LOOPS,
RECURSION ARE ALLOWED........................ | IBM | 9 |
| what is out put of the following code?
#include
class Base
{
Base()
{
cout<<"constructor base";
}
~Base()
{
cout<<"destructor base";
}
}
class Derived:public Base
{
Derived()
{
cout<<"constructor derived";
}
~Derived()
{
cout<<"destructor derived";
}
}
void main()
{
Base *var=new Derived();
delete var;
}
| Honeywell | 2 |
| Find the middle node in the linked list??
(Note:Do not use for loop, count and count/2) | Subex | 2 |
| Dear Sir,
we are required the bubble sorting programs
Regs
Prem | | 1 |
| What is the difference between constant pointer and pointer
to a constant. Give examples. | TCS | 3 |
| Why doesn't C have nested functions? | | 2 |
| write a “Hello World” program in “c” without using a semicolon? | | 3 |
| how many keywords do C compile? | Microsoft | 2 |
| Difference between null pointer and dangling pointer? | Wipro | 3 |
| which of the function operator cannot be over loaded
a) <=
b)?:
c)==
d)*
| HCL | 7 |
| void main()
{int a[5],i,b=16;
for(i=0;i<5;i++)
a[i]=2*i;
f(a,5,b);
for(i=0;i<5;i++)
printf("\n %d",a[i]);
printf("\n %d",b);
}
f(int *x,int n,int y)
{
int i;
for(i=0;i<n;i++)
*(x+i)+=2;
y=y+2;
}wat r the errors in the prg.and improvise the prg to get o/p.? | | 2 |
| differentiate between
const char *a;
char *const a; and
char const *a;
| HCL | 1 |
| i want to have a program to read a string and print the
frequency of each character and it should work in turbo c | | 2 |
| Write a C program to print 1 2 3 ... 100 without using
loops? | | 5 |
| How can I implement opaque (abstract) data types in C?
What's the difference between these two declarations?
struct x1 { ... };
typedef struct { ... } x2;
| | 2 |
| WHY DO WE USE A TERMINATOR IN C LANGUAGE? | | 2 |
| |
| For more C Interview Questions Click Here |