| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| what is the output of below pgm?
void main()
{
int i=0;
if(i)
printf("pass");
else
printf("fail");
} | | 3 |
| Write a program to find the given number is odd or even
without using any loops(if,for,do,while) | | 2 |
| Which of the Following is not defined in string.h?
A)strspn()
B)strerror()
C)memchr()
D)strod()
| Accenture | 1 |
| what is y value of the code if input x=10
y=5;
if (x==10)
else if(x==9)
elae y=8;
a.9
b.8
c.6
d.7
| TCS | 2 |
| What is the Difference between Macro and ordinary
definition? | Motorola | 2 |
| what is the output for the code :
main()
{
int i,j;
printf("%d %d ",scanf("%d%d",&i,&j));
} | Infosys | 14 |
| What is the diffences between Windows XP and Windows Visa
| Aricent | 1 |
| int i =10
main()
{
int i =20,n;
for(n=0;n<=i;)
{
int i=10
i++;
}
printf("%d", i);
| HCL | 5 |
| DIFFERNCE BETWEEN THE C++ AND C LANGUAGE? | Wipro | 1 |
| main()
{
char *p;
p="Hello";
printf("%c\n",*&*p);
}
| ME | 2 |
| What is RAM memory? and What is ROM?Who designed one is
temparary and another is permanent?why they designed like
that?By using far pointer which type data(whether
hexadecimal)we can access? | Excel | 1 |
| Two's compliment of -5 | Adobe | 3 |
| Every time i run a c-code in editor,
getting some runtime error and editor is disposing,
even after reinstalling the software
what may be the problem? | | 2 |
| How can we open a file in Binary mode and Text mode?what is
the difference? | PanTerra | 1 |
| how to find sum of digits in C?
| CTS | 10 |
| 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 | 2 |
| How can I allocate arrays or structures bigger than 64K? | | 4 |
| Why preprocessor should come before source code?
| | 2 |
| Find the middle node in the linked list??
(Note:Do not use for loop, count and count/2) | Subex | 2 |
| 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 |
| |
| For more C Interview Questions Click Here |