| Other C Interview Questions |
| |
| Question |
Asked @ |
Answers |
| |
| write a program that eliminates the value of mathematical
constant e by using the formula
e=1+1/1!+1/2!+1/3!+ |
Reliance | 1 |
| write a program in c language to print your bio-data on the
screen by using functions. |
IBM | 1 |
| What is the function of ceil(X) defined in math.h do?
A)It returns the value rounded down to the next lower
integer
B)it returns the value rounded up to the next higher integer
C)the Next Higher Value
D)the next lower value |
Accenture | 3 |
| why programming language C is still used in operating system's
kernel?? |
Wipro | 1 |
| consider the following program sigment
int n,sum=1;
switch(n) {
case 2:sum=sum+2;
case 3:sum*=2;
break;
default:sum=0;}
if n=2, what is the value of sum
a.0
b.6
c.3
d.none
|
TCS | 7 |
| What will be result of the following program?
void myalloc(char *x, int n)
{
x= (char *)malloc(n*sizeof(char));
memset(x,\0,n*sizeof(char));
}
main()
{
char *g="String";
myalloc(g,20);
strcpy(g,"Oldstring");
printf("The string is %s",g);
}
a) The string is : String
b) Run time error/Core dump
c) The string is : Oldstring
d) Syntax error during compilation
e) None of these
|
IBM | 3 |
| void main()
{
char c;
while(c=getchar()!='\n')
printf("%d",c);
}
o/p=11 why? |
Wipro | 8 |
| the code is::::: if(condition)
printf("hello");
else
printf("world");
WHAT WILL BE THE CONDITION IN IF IN SUCH A WAY THAT BOTH
HELLO AND WORLD ARE PRINTED IN A SINGLE ATTEMPT?????? SINGLE
ATTEMPT IN THE SENSE... IT MUST FIRST PRINT "HELLO" AND IT
MUST GO TO ELSE PART AND PRINT "WORLD"..... NO LOOPS,
RECURSION ARE ALLOWED........................ |
IBM | 12 |
| what is a c-language.what is do. |
HCL | 4 |
| how can i get output the following...
5 4 3 2 1
4 3 2 1
3 2 1
2 1
1
and
1
2 3
4 5 6
7 8 9 10
11 12 13 14 15
plz plz... |
| 3 |
| i=20,k=0;
for(j=1;j<i;j=1+4*(i/j))
{
k+=j<10?4:3;
}
printf("%d", k);
|
HCL | 8 |
| What are the commands should be given before weiting C
Program i.e, Cd.. like |
Infonet | 4 |
| |
| For more C Interview Questions Click Here |