| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| how to convert binary to decimal and decimal to binary in C
lanaguage | | 4 |
| consider the following program sigment
int n,sum=1;
switch(n) {
case 2:sum=sum+2;
case 3:sum*=2;
break;
default:sum=0;}
if n=2, what is the value of sum
a.0
b.6
c.3
d.none
| TCS | 4 |
| 10. Study the code:
void show()
main()
{
show();
}
void show (char *s)
{
printf("%sn",s);
}
What will happen if it is compiled & run on an ANSI C
Compiler?
A)It will compile & nothing will be printed when it is
executed
B)it will compile but not link
C)the compiler will generate an error
D)the compiler will generate a warning
| Accenture | 4 |
| HOW CAN ADD OUR FUNCTION IN LIBRARY. | | 5 |
| what is diff between localstatic and globalstatis variable
possible 2 use in another file...? | HCL | 2 |
| post new interiew question and aptitude test papers | | 1 |
| How to set a variable in the environment list? | | 1 |
| Write code for initializing one dimentional and two
dimentional array in a C Program? | Deshaw | 5 |
| In the following control structure which is faster?
1.Switch
2.If-else
and which consumes more memory? | | 4 |
| What is the Difference between Class and Struct? | Motorola | 9 |
| without using arithmatic operator convert an intger variable
x into x+1 | | 1 |
| pgm in c to reverse string by word using array(god is love
becomes love is god)
(no additional array can used,space is only delimiter
between words ) | Persistent | 1 |
| sir,
i cannot find the way how to write aprogram by using
array on queue | IISIT | 1 |
| without a terminator how can we print a message in a printf
() function. | NIIT | 5 |
| C program code
int zap(int n)
{
if(n<=1)then zap=1;
else zap=zap(n-3)+zap(n-1);
}
then the call zap(6) gives the values of zap
[a] 8 [b] 9 [c] 6 [d] 12 [e] 15
| Wipro | 4 |
| Can you think of a way when a program crashed before
reaching main? If yes how? | | 2 |
| Write a C++ program without using any loop (if, for, while
etc) to print numbers from 1 to 100 and 100 to 1;
| | 7 |
| 1. Write the function int countchtr(char string[ ], int ch);
which returns the number of times the character ch appears
in the string.
Example, the call countchtr(“She lives in NEWYORK”, ‘e’)
would return 3.
| | 2 |
| How to add two numbers without using arithmetic operators? | Sapient | 11 |
| sqrt(x+sqrt(x+sqrt(x+sqrt(x))))=2;
Find the value of x? | Subex | 2 |
| |
| For more C Interview Questions Click Here |