| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| 1)which of following operator can't be overloaded.
a)== b)++ c)?! d)<= | Siemens | 6 |
| long int size
a) 4 bytes b) 2 bytes c) compiler dependent d) 8 bytes
| HCL | 8 |
| pgm to reverse string using arrays i.e god is love becomes
love is god)
(assumption:only space is used for seperation of words)
no addtional memory used.i.e no temporary arrays can used. | Persistent | 2 |
| void swap(int a,int b)
{
a=a+b;
b=a-b;
a=a-b;
}
in this code always gives the same result for all case | TCS | 5 |
| what is the benefit of c30 | | 1 |
| How do you write a program which produces its own source
code as its output? | | 2 |
| #include<stdio.h>
main()
{
char *p1;
char *p2;
p1=(char *) malloc(25);
p2=(char *) malloc(25);
strcpy(p1,"Ramco");
strcpy(p2,"Systems");
strcat(p1,p2);
printf("%s",p1);
}
Tell me the output? | Ramco | 4 |
| Which of the following is not a valid declaration for main
()?
1) int main()
2) int main(int argc, char *argv[])
3) They both work
| | 2 |
| 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 | 1 |
| which of the following go out of the loopo if expn 2
becoming false
a.while(expn 1){...if(expn 2)continue;}
b.while(!expn 1){if(expn 2)continue;...}
c.do{..if(expn 1)continue;..}while(expn 2);
d.while(!expn 2){if(expn 1)continue;..}
| TCS | 2 |
| How the processor registers can be used in C ? | HP | 4 |
| Explain following declaration
int *P(void);
and
int (*p)(char *a);
| | 2 |
| void main()
{
int i=5;
printf("%d",i++ + ++i);
} | ME | 4 |
| Write code for initializing one dimentional and two
dimentional array in a C Program? | Deshaw | 5 |
| Can I pass constant values to functions which accept structure
arguments? | | 2 |
| How would you find a cycle in a linked list?
| | 2 |
| N O S I E R
+ A S T R A L
----------------
7 2 5 6 1 3 | Honeywell | 1 |
| what is the function of void main()? | | 3 |
| write a programme that inputs a number by user and gives
its multiplication table. | | 2 |
| what will happen if you free a pointer twice after
allocating memory dynamically ? | Novell | 1 |
| |
| For more C Interview Questions Click Here |