| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| what are the general concepts of c and c++ | | 1 |
| what is the difference between declaration ,defenetion and
initialization of a variable? | LG-Soft | 5 |
| how to print a statement in c without use of console
statement ,with the help of if statement it should print
| Satyam | 2 |
| HOW TO FIND OUT THE RREVERS OF A GIVEN DIGIT NUMBER IF IT
IS INPUT THROUGH THE KEYBORD BY USING C LANGUAGE | | 2 |
| enum colors {BLACK,BLUE,GREEN}
main()
{
printf("%d..%d..%d",BLACK,BLUE,GREEN);
return(1);
}
| ME | 3 |
| Write code for finding depth of tree | Adobe | 1 |
| program to find the ASCII value of a number | | 5 |
| CopyBits(x,p,n,y)
copy n LSBs from y to x starting LSB at 'p'th position. | Adobe | 4 |
| What is the most efficient way to count the number of bits
which are set in a value? | | 3 |
| Which is not valid in C?
1) class aClass{public:int x;}
2) /* A comment */
3) char x=12;
| | 5 |
| what is memory leak?
| | 3 |
| Print the foll in C...eg when n=5 the o/p must b
+ +
+ + + +
+ + + + +
+ + + +
+ + | | 1 |
| Difference between Class and Struct.
| Motorola | 6 |
| what does exit() do? | Cadence | 3 |
| AMMONG THE 4 STROAGE CLASSES IN C, WHICH ONE FASTEST? | HCL | 12 |
| which one is highest Priority in c?
a)=,b)+,c)++,d)== | | 3 |
| read the folllowing code
# define MAX 100
# define MIN 100
....
....
if(x>MAX)
x=1;
else if(x<MIN)
x=-1;
x=50;
if the initial value of x=200,what is the vlaue after
executing this code?
a.200
b.1
c.-1
d.50
| TCS | 2 |
| 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 | 4 |
| what is y value of the code if input x=10
y=5;
if (x==10)
else if(x==9)
elae y=8;
a.9
b.8
c.6
d.7
| TCS | 2 |
| what is the advantage of function pointer | TCS | 10 |
| |
| For more C Interview Questions Click Here |