| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| 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 |
| Write a program to compare two strings without using the
strcmp() function | Accenture | 6 |
| Write a program for the following series:
1*3*5-2*4*6+3*5*7-4*6*8+.................up to nterms | Convex-Digital | 4 |
| two progs are given. one starts counting frm 0 to MAX and
the other stars frm MAX to 0. which one executes fast.
| Verifone | 3 |
| what is the difference between <stdio.h> and "stdio.h" | Kanbay | 5 |
| #include<stdio.h>
main()
{
char s1[]="Ramco";
char s2[]="Systems";
s1=s2;
printf("%s",s1);
}
Find the output | CitiGroup | 4 |
| Reverse the part of the number which is present from
position i to j. Print the new number.[without using the array]
eg:
num=789876
i=2
j=5
778986 | | 2 |
| main()
{
int i,j,A;
for(A=-1;A<=1;A++)
prinf("%d\t",!!A);
} | | 4 |
| the factorial of non-negative integer n is written n! and
is defined as follows:
n!=n*(n-1)*(n-2)........1(for values of n greater than or
equal to 1 and
n!=1(for n=0)
Perform the following
1.write a c program that reads a non-negative integer and
computes and prints its factorial.
2. write a C program that estimates the value of the
mathematical constant e by using the formula:
e=1+1/!+1/2!+1/3!+....
3. write a c program the computes the value ex by using the
formula
ex=1+x/1!+xsquare/2!+xcube/3!+....
| Ignou | 1 |
| What is true about the following
C Functions
a.Need not return any value
b.Should always return an integer
c.Should always return a float
d.Should always return more than one value.
| TCS | 6 |
| post new interiew question and aptitude test papers | | 1 |
| write the program for maximum of the following numbers?
122,198,290,71,143,325,98 | | 4 |
| HOW DO YOU HANDLE EXCEPTIONS IN C?
| AppLabs | 2 |
| The differences between Windows XP and Windows Visa
| HCL | 6 |
| what is the different between if-else and switch statment
(other than syntax) | CTS | 9 |
| void main()
{
char far *farther,*farthest;
printf("%d..%d",sizeof(farther),sizeof(farthest));
}
| ME | 3 |
| Write a Program to print this triangle:
*
**
*
****
*
******
*
********
*
**********
use two nested loops. | | 4 |
| True or false: If you continuously increment a variable, it
will become negative?
1) True
2) False
3) It depends on the variable type
| | 4 |
| Switch (i)
i=1;
case 1
i++;
case 2
++i;
break;
case 3
--i;
Output of i after executing the program
| Mascot | 4 |
| What's the difference between struct x1 { ... }; and
typedef struct { ... } x2; ?
| | 2 |
| |
| For more C Interview Questions Click Here |