| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| f()
{
int a=2;
f1(a++);
}
f1(int c)
{
printf("%d", c);
}
c=?
| Geometric-Software | 2 |
| How to access or modify the const variable in c ? | HP | 3 |
| f(*p)
{
p=(char *)malloc(6);
p="hello";
return;
}
main()
{
char *p="bye";
f(p);
printf("%s",p);
}
what is the o/p?
| Hughes | 2 |
| what's the o/p
int main(int n, char *argv[])
{
char *s= *++argv;
puts(s);
exit(0);
}
| Motorola | 1 |
| What is the value of y in the following code?
x=7;y=0;
if(x=6)
y=7;
else
y=1;
| TCS | 10 |
| While(1)
{
}
when this loop get terminate is it a infinite loop? | | 3 |
| how does the for loop work actually..suppose for the
following program how it ll work plz explain to me
for(i=5;i>=0;i--)
prinf(i--); | RMSI | 13 |
| if a five digit number is input through the keyboard, write
a program to calculate the sum of its digits.
(hint:-use the modulus operator.'%') | | 5 |
| what is the function of void main()? | | 4 |
| write a function to find whether a string is palindrome or
not and how many palindrome this string contain? | | 1 |
| WRITE A PROGRAM TO PRINT THE FOLLOWING OUTPUTS USING FOR
LOOPS.
A) * B) *****
*** * *
***** * *
***** | | 2 |
| n=7623
{
temp=n/10;
result=temp*10+ result;
n=n/10
}
| Wipro | 3 |
| study the code:
#include<stdio.h>
void main()
{
const int a=100;
int *p;
p=&a;
(*p)++;
printf("a=%dn(*p)=%dn",a,*p);
}
What is printed?
A)100,101 B)100,100 C)101,101 D)None of the
above | Accenture | 12 |
| write a program to generate 1st n fibonacci prime number | | 4 |
| HOW TO SWAP TWO NOS IN ONE STEP? | Satyam | 10 |
| main()
{
int i=1;
while (i<=5)
{
printf("%d",i);
if (i>2)
goto here;
i++;
}
}
fun()
{
here:
printf("PP");
}
| ME | 3 |
| code snippet for creating a pyramids triangle
ex
1
2 2
3 3 3 | | 2 |
| Consider a language that does not have arrays but does have
stacks as a data type.and PUSH POP..are all defined .Show
how a one dimensional array can be implemented by using two
stacks. | Google | 3 |
| What is the Difference between Macro and ordinary
definition? | Motorola | 2 |
| Give me basis knowledge of c , c++... | | 4 |
| |
| For more C Interview Questions Click Here |