| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| WRITE A PROGRAM TO FIND A REVERSE OF TWO NO | | 4 |
| main()
{
printf(5+"Vidyarthi Computers");
} | | 5 |
| Function to find the given number is a power of 2 or not? | Motorola | 9 |
| Is there any restriction in how many arguments printf or
scanf function can take?
in which file in my c++ compiler i can see the code for
implementation of these two functions?? | | 2 |
| write a C program to print the program itself ?! | TCS | 6 |
| how to exchnage bits in a byte
b7<-->b0 b6<-->b1 b5<-->b2 b4<-->b3
please mail me the code if any one know to
rajeshmb4u@gmail.com | Honeywell | 3 |
| Why doesn't the code "int a = 1000, b = 1000;
long int c = a * b;" work? | | 3 |
| what is the value of 'i'?
i=strlen("Blue")+strlen("People")/strlen("Red")-strlen("green")
| Cadence | 2 |
| How to add two numbers without using arithmetic operators? | Sapient | 6 |
| Result of the following program is
main()
{
int i=0;
for(i=0;i<20;i++)
{
switch(i)
case 0:i+=5;
case 1:i+=2;
case 5:i+=5;
default i+=4;
break;}
printf("%d,",i);
}
}
a)0,5,9,13,17
b)5,9,13,17
c)12,17,22
d)16,21
e)syntax error
| IBM | 3 |
| if a five digit number is input through the keyboard, write
a program to calculate the sum of its digits.
(hint:-use the modulus operator.'%') | | 4 |
| Go through the following code sinippet
char a[20];
a="Hello Orcale Test";
will this compile?
| Oracle | 2 |
| what is the output of below pgm?
void main()
{
int i=0;
if(i)
printf("pass");
else
printf("fail");
} | | 2 |
| What is the most efficient way to count the number of bits
which are set in a value? | | 2 |
| I have a function which accepts, and is supposed to
initialize,a pointer, but the pointer in the caller remains
unchanged. | | 1 |
| 15.what is the disadvantage of using macros?
16.what is the self-referential structure?
17.can a union be self-referenced?
18.What is a pointer?
19.What is the Lvalue and Rvalue?
20.what is the difference between these initializations?
21.Char a[]=”string”;
22.Char *p=”literal”;
23.Does *p++ increment p, or what it points to? | | 1 |
| what is the difference between NULL & NUL keywords in C? | | 3 |
| helllo sir ,
what is the main use of the pointer ,array ,and the
structure with the example of a programe | | 1 |
| main()
{
char *p;
p="Hello";
printf("%c\n",*&*p);
}
| ME | 2 |
| write a program to print the all 4digits numbers & whose
squares must me even numbers? | Virtusa | 1 |
| |
| For more C Interview Questions Click Here |