| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| write a program for size of a data type without using
sizeof() operator? | | 7 |
| What ios diff. Between %e & %f? | Honeywell | 1 |
| Is main() function predfined or userdefined? | | 7 |
| 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.'%') | | 9 |
| Can u return two values using return keyword? If yes, how?
If no, why? | | 7 |
| what are the interview question's in the language c | Nipuna | 1 |
| 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 |
| Write a program which take a integer from user and tell
whether the given variable is squar of some number or not.
eg: is this number is 1,4,9,16... or not
| Alcatel | 8 |
| what is the difference between normal variables and pointer
variables.............. | Satyam | 7 |
| How to swap two values using a single variable ?
condition: Not to use Array and Pointer ? | | 4 |
| f(*p)
{
p=(char *)malloc(6);
p="hello";
return;
}
main()
{
char *p="bye";
f(p);
printf("%s",p);
}
what is the o/p?
| Hughes | 4 |
| what is out put of the following code?
#include
class Base
{
Base()
{
cout<<"constructor base";
}
~Base()
{
cout<<"destructor base";
}
}
class Derived:public Base
{
Derived()
{
cout<<"constructor derived";
}
~Derived()
{
cout<<"destructor derived";
}
}
void main()
{
Base *var=new Derived();
delete var;
}
| Honeywell | 2 |
| what is the differance between pass by reference and pass
by value. | Infosys | 4 |
| HOW CAN ADD OUR FUNCTION IN LIBRARY. | | 5 |
| how the size of an integer is decided?
- is it based on processor or compiler or OS? | nvidia | 16 |
| Why preprocessor should come before source code?
| | 2 |
| Give a fast way to multiply a number by 7 | Microsoft | 8 |
| what is data structure
| | 4 |
| const char *
char * const
What is the differnce between the above tow?.
| TCS | 5 |
| f()
{
int a=2;
f1(a++);
}
f1(int c)
{
printf("%d", c);
}
c=?
| Geometric-Software | 2 |
| |
| For more C Interview Questions Click Here |