| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| difference between my-strcpy and strcpy ? | Geometric-Software | 3 |
| the format specified for hexa decimal is
a.%d
b.%o
c.%x
d.%u
| TCS | 4 |
| Print the foll in C...eg when n=5 the o/p must b
+ +
+ + + +
+ + + + +
+ + + +
+ + | | 1 |
| macros and function are related in what aspect?
a)recursion b)varying no of arguments
c)hypochecking d)type declaration
| HCL | 8 |
| write an algorithm to get a sentence and reverse it in the
following format:
input : I am here
opuput: Here Am I
note: first letter of every word is capiatlised | | 2 |
| program to get the remainder and quotant of given two
numbers with out using % and / operators? | IBM | 8 |
| why i join syntel? | Syntel | 12 |
| Write the program for displaying the ten most frequent words
in a file such that your program should be efficient in all
complexity measures. | Google | 3 |
| What will be printed as the result of the operation below:
#include<..>
int x;
int modifyvalue()
{
return(x+=10);
}
int changevalue(int x)
{
return(x+=1);
}
void main()
{
int x=10;
x++;
changevalue(x);
x++;
modifyvalue();
printf("First output:%d\n",x);
x++;
changevalue(x);
printf("Second output:%d\n",x);
modifyvalue();
printf("Third output:%d\n",x);
} | | 2 |
| for(i=1;i>0;i++);
printf("i=%d",i);
what will be the answer???? | | 6 |
| write a program to check whether a given integer is a strong
number or not?
[Hint:
145=1!+4!+5!
=1+24+120
=145]
| | 2 |
| How do you write a program which produces its own source
code as its output? | | 2 |
| what is the use of getch() function in C program..
difference b/w getch() and getche()?? | Wipro | 12 |
| int main()
{
int *p=new int;
*p=10;
del p;
cout<<*p;
*p= 60;
cout<<*p;
}
what will be the output & why? | TCS | 4 |
| pgm in c to reverse string by word using array(god is love
becomes love is god)
(no additional array can used,space is only delimiter
between words ) | Persistent | 1 |
| program to find the roots of a quardratic equation | | 1 |
| design and implement a program that reads floating-points
numbers in a sentinel-controlled loop until the user
terminates the program by entering zero.your program should
determinate and print the smallest,largest and average of
the supplied numbers. | | 1 |
| What is external and internal variables
What is dynamic memory allocation
what is storage classes in C | | 2 |
| void main()
{
int s[4][2]={ {1234,56},{1212,33},{1434,80},{1312,78} };
int (*p)[2];
int i,j,*pint;
for(i=0;i<=3;i++)
{
p=&s[i];
pint=p;
printf("\n");
for(j=0;j<=1;j++)
printf("%d",*(pint+j));
}
} while running this program it shows a warning-suspicious
pointer conversion ie pint=p; my que is why should we assign
the value of p to pint again.why cant we use it directly as
*(p+j)..but if i use like tat the o/p is garbage value.. | | 1 |
| 34.what are bitwise shift operators?
35.what are bit fields? What is the use of bit fields in a
structure declaration?
36.what is the size of an integer variable?
37.what are the files which are automatically opened when a
c file is executed?
38.what is the little endian and big endian?
39.what is the use of fflush() function?
40.what is the difference between exit() and _exit() functions?
41.where does malloc() function get the memory?
42.what is the difference between malloc() and calloc()
function?
43.what is the difference between postfix and prefix unary
increment operators? | | 2 |
| |
| For more C Interview Questions Click Here |