| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| 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 |
| which one of follwoing will read a character from keyboard
and store in c
a)c=getc()
b)c=getchar()
c)c=getchar(stdin)
d)getc(&c)
e)none | | 5 |
| why should i select you? | Wipro | 18 |
| why the execution starts from main function | | 9 |
| What is the difference between constant pointer and pointer
to a constant. Give examples. | TCS | 4 |
| Given an array of characters which form a sentence of
words, give an efficient algorithm to reverse the order of
the words (not characters) in it? | | 3 |
| 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 difference between char a[] = "string"; and
char *p = "string"; ? | Honeywell | 11 |
| Can you think of a way when a program crashed before
reaching main? If yes how? | | 2 |
| what is the difference between getch() and getchar()? | | 5 |
| the operator for exponencation is
a.**
b.^
c.%
d.not available
| TCS | 4 |
| main()
{
char *p;
p="Hello";
printf("%c\n",*&*p);
}
| ME | 2 |
| dibakar & vekatesh..uttejana here..abt ur reply for in
place reversal of linked list..wats p stands for there? | | 1 |
| what is a far pointer | TCS | 9 |
| Which of the following is not a valid declaration for main
()?
1) int main()
2) int main(int argc, char *argv[])
3) They both work
| | 2 |
| explain memory layout of a C program | | 1 |
| how to print value of e(exp1)up to required no of digits
after decimal? | | 1 |
| helllo sir
give me some information of the basic information the
c as printf ,scanf , %d ,%f and why is the main use of
these. | | 3 |
| write a 'c' program to sum the number of integer values | | 5 |
| write a program structure to find average of given number | | 1 |
| |
| For more C Interview Questions Click Here |