| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| 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 |
| what is the difference between
const char *p, char const *p, const char* const p
| Accenture | 4 |
| What is the Difference between Macro and ordinary
definition? | Motorola | 2 |
| WAP to convert text into its ASCII Code and also write a
function to decode the text given? | | 2 |
| if a person is buying coconuts of Rs10,and then sell that
coconuts of Rs9,with the loss of one rupee.After that the
person became a millaniore.how? | Wipro | 5 |
| To what value do nonglobal variables default?
1) auto
2) register
3) static
| | 4 |
| Predict the output or error(s) for the following:
25. main()
{
printf("%p",main);
}
| ME | 3 |
| Can you think of a way when a program crashed before
reaching main? If yes how? | | 2 |
| C passes By value or By reference? | Geometric-Software | 5 |
| difference between i++* and *++i | IBM | 3 |
| could u able to tell about suresoft technical session | | 1 |
| 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. | | 2 |
| 52.write a “Hello World” program in “c” without using a
semicolon?
53.Give a method to count the number of ones in a 32 bit number?
54.write a program that print itself even if the source file
is deleted?
55.Given an unsigned integer, find if the number is power of 2? | | 6 |
| n=7623
{
temp=n/10;
result=temp*10+ result;
n=n/10
}
| Wipro | 4 |
| main()
{
printf(5+"Vidyarthi Computers");
} | | 6 |
| To find whether a number is even or odd without using any
conditional operator?? | IBM | 4 |
| x=2,y=6,z=6
x=y==z;
printf(%d",x)
| HCL | 8 |
| How the C program can be compiled? | HP | 7 |
| a=0;
while(a<5)
printf("%d\n",a++);
how many times does the loop occurs?
a.infinite
b.5
c.4
d.6
| TCS | 5 |
| 5. distance conversion:
Convert a distance from miles to kilometers .there are 5280
feets per mile,12 inches per foot .2.54 centimeters per
inch and 100000centimeters per kilometer
| | 1 |
| |
| For more C Interview Questions Click Here |