| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| What's the best way to declare and define global variables? | | 5 |
| True or false: If you continuously increment a variable, it
will become negative?
1) True
2) False
3) It depends on the variable type
| | 5 |
| What is sparse file? | | 1 |
| Hai why 'c' is the middle language | | 2 |
| how many times of error occur in C | | 7 |
| what is the maximum no. of bytes calloc can allocate | Mphasis | 2 |
| # define prod(a,b)=a*b
main()
{
int x=2;
int y=3;
printf("%d",prod(x+2,y-10)); }
the output of the program is
a.8
b.6
c.7
d.none
| TCS | 5 |
| Look at the Code:
main()
{
int a[]={1,2,3},i;
for(i=0;i<3;i++)
{
printf("%d",*a);
a++;
}
}
Which Statement is/are True w.r.t the above code?
I.Executes Successfully & Prints the contents of the array
II.Gives the Error:Lvalue Required
III.The address of the array should not be changed
IV.None of the Above.
A)Only I B)Only II C)II & III D)IV
| Accenture | 3 |
| C,c++, Java is all are structural oriented or procedure
oriented language..? | | 3 |
| explain memory layout of a C program | | 1 |
| int zap(int n)
{
if(n<=1)then zap=1;
else zap=zap(n-3)+zap(n-1);
}
then the call zap(6) gives the values of zap
[a] 8 [b] 9 [c] 6 [d] 12 [e] 15
| Wipro | 8 |
| ABCDCBA
ABC CBA
AB BA
A A | | 1 |
| what is the advantage of using SEMAPHORES to ORDINARY
VARIABLES??? | NSN | 1 |
| a memory of 20 bytes is allocated to a string declared as
char *s then the following two statements are executed:
s="Etrance"
l=strlen(s);
what is the value of l ?
a.20
b.8
c.9
d.21
| TCS | 4 |
| Write a program for the following series?
1
121
12321
1234321
123454321
12345654321
1234567654321
123456787654321
12345678987654321
1234567890987654321
123456789010987654321
12345678901210987654321
1234567890123210987654321
.........1234321............
..........123454321............
..........12345654321............
7
8
9
0
1
Pls............? | | 2 |
| i want explaination about the program and its stack reprasetaion
fibbo(int n)
{
if(n==1 or n==0)
return n;
else
return fibbo(n-1)+fibbo(n-2);
}
main()
{
fibbo(6);
}
| | 2 |
| How can I convert integers to binary or hexadecimal? | | 2 |
| write a program to print sum of each row of a 2D array.
| | 2 |
| What is the diffences between Windows XP and Windows Visa
| Aricent | 1 |
| what is meant by the "equivalence of pointers and arrays" in
C? | Satyam | 3 |
| |
| For more C Interview Questions Click Here |