| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| class foo {
public:
static int func(const char*& p) const;
};
This is illegal, why? | Google | 6 |
| please give me some tips for the selection in TCS. | TCS | 3 |
| fn f(x)
{ if(x<=0)
return;
else f(x-1)+x;
}
| HCL | 3 |
| Explain following declaration
int *P(void);
and
int (*p)(char *a);
| | 2 |
| proc() {
static i=10;
printf("%d",i);
}
If this proc() is called second time, what is the output?
| Hughes | 5 |
| A function 'q' that accepts a pointer to a character as
argument and returns a pointer to an array of integer can
be declared as:
A)int (*q(char*)) []
B)int *q(char*) []
C)int(*q)(char*) []
D)None of the Above
| Accenture | 2 |
| void main()
{
int i=5;
printf("%d",i+++++i);
}
| ME | 12 |
| write a c program to accept a given integer value and print
its value in words | | 2 |
| What is #pragma directive?how it is used in the program?
what is its advantages and disadvantages? | | 1 |
| what does the following function print?
func(int i)
{
if(i%2)return 0;
eale return 1;
}
main()
{
int =3;
i=func(i);
i=func(i);
printf("%d",i);}
| TCS | 8 |
| Explain the differences between public, protected, private
and internal. | | 1 |
| what is the advantage of function pointer | TCS | 9 |
| IS STRUCTURES CAN BE USED WITHIN AN ARRAY? | Caritor | 7 |
| Explain what?s happening in the first constructor: public
class c{ public c(string a) : this() {;}; public c() {;} }
How is this construct useful?
| | 1 |
| O,T,T,F,F,S,S,E,N,?,?,?,T,F,F,S,S,E,N | ADP | 7 |
| Add 2 64 bit numbers on a 32 bit machine | NetApp | 1 |
| what is the value of 'i'?
i=strlen("Blue")+strlen("People")/strlen("Red")-strlen("green")
| Cadence | 3 |
| 1,1,5,17,61,217,?,?. | | 3 |
| Write a program to print this triangle:
*
**
*
****
*
******
*
********
*
**********
Don't use printf statements;use two nested loops instead.
you will have to use braces around the body of the outer
loop if it contains multiple statements. | | 1 |
| What are the phases in s/w developed life cycle?
wat is the diff b/w stack & queue...where do we use stack | | 5 |
| |
| For more C Interview Questions Click Here |