| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| #ifdef TRUE
int I=0;
#endif
main()
{
int j=0;
printf("%d %d\n",i,j);
}
| ADITI | 2 |
| f=(x>y)?x:y
a) f points to max of x and y
b) f points to min of x and y
c)error
| HCL | 4 |
| what is the difference between #include<stdio.h> and
#include "stdio.h" ? | | 2 |
| #define min((a),(b)) ((a)<(b))?(a):(b)
main()
{
int i=0,a[20],*ptr;
ptr=a;
while(min(ptr++,&a[9])<&a[8]) i=i+1;
printf("i=%d\n",i);}
| | 3 |
| How can we open a file in Binary mode and Text mode?what is
the difference? | PanTerra | 1 |
| what is the difference between malloc() and calloc() function? | | 1 |
| #include <stdio.h>
int main ( int argc, char* argv [ ] )
{
int value1 = 10;
int value2 = 5;
printf ( "\n The sum is :%d", value1 | value2 );
}
This is the answer asked by some one to add two numbers
with out using arithmetic operator?Yes this answer is write
it given out put as 15.But how?????
what is need of following line?
int main ( int argc, char* argv [ ] )
how it work?what is the meaning for this line?
please explain me.Advance thanks | Excel | 4 |
| i=20,k=0;
for(j=1;j<i;j=1+4*(i/j))
{
k+=j<10?4:3;
}
printf("%d", k);
| HCL | 6 |
| Find string palindrome 10marks
| Honeywell | 5 |
| a number is perfect if it is equal to the sum of its proper
divisor..
6 is perfect number coz its proper divisors are 1,2 and
three.. and 1+2+3=6...
a number is deficient if the sum of its proper divisor is
less than the number..
sample: 8 is deficient, coz its proper divisors are 1,2 and
4, and 1+2+4=7.
abundant number, if the sum of its proper divisor is greater
than the number..
sample..12 is abundant coz 1+2+3+4+6=16 which is geater than 12.
now write a program that prompts the user for a number, then
determines whether the number is perfect,deficient and
abundant.. | | 1 |
| write the program for prime numbers? | TCS | 10 |
| how to convert an char array to decimal array | | 3 |
| Hi,
main()
{
}
Is a user defined function or Built in Functionn | Honeywell | 9 |
| how to print a statement in c without use of console
statement ,with the help of if statement it should print
| Satyam | 2 |
| In scanf h is used for | BFL | 2 |
| Will Macros support multiple arguments ?
| Oracle | 7 |
| what is difference b/w extern & volatile variable?? | Teleca | 2 |
| tell me the full form of c? | | 2 |
| difference between semaphores and mutex? | | 1 |
| wap in c to accept n number display the highest and lowest
value | | 2 |
| |
| For more C Interview Questions Click Here |