| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| #include <stdio.h>
int main ( int argc, char* argv [ ] )
{
int value1 = 10;
int value2 = 5;
printf ( "\n The sum is :%d", value1 | value2 );
}
This is the answer asked by some one to add two numbers
with out using arithmetic operator?Yes this answer is write
it given out put as 15.But how?????
what is need of following line?
int main ( int argc, char* argv [ ] )
how it work?what is the meaning for this line?
please explain me.Advance thanks | Excel | 4 |
| Is it possible to create recycle bin in mobiles? | | 2 |
| Explain following declaration
int *P(void);
and
int (*p)(char *a);
| | 2 |
| a=0;
b=(a=0)?2:3;
a) What will be the value of b? why
b) If in 1st stmt a=0 is replaced by -1, b=?
c) If in second stmt a=0 is replaced by -1, b=?
| Geometric-Software | 6 |
| 44.what is the difference between strcpy() and memcpy()
function?
45.what is output of the following statetment?
46.Printf(“%x”, -1<<4); ?
47.will the program compile?
int i;
scanf(“%d”,i);
printf(“%d”,i);
48.write a string copy function routine?
49.swap two integer variables without using a third
temporary variable?
50.how do you redirect stdout value from a program to a file?
51.write a program that finds the factorial of a number
using recursion? | | 3 |
| Study the Following Points:
a.One Cannot Take the address of a Bit Field
b.bit fields cannot be arrayed
c.Bit-Fields are machine Dependant
d.Bit-fields cannot be declared as static
1. Which of the Following Statements are true w.r.t Bit-
Fields
A)a,b&c B)Only a & b C)Only c D)All
| Accenture | 2 |
| write a programe returns the number of times the character
appears in the string | | 1 |
| Unsigned char c;
for ( c=0;c!=256;c++2)
printf("%d",c);
No. of times the loop is executed ?
| Mascot | 3 |
| How do you write a program which produces its own source
code as its output? | | 2 |
| Hi,
main()
{
}
Is a user defined function or Built in Functionn | Honeywell | 9 |
| How can I convert integers to binary or hexadecimal? | | 2 |
| #include<stdio.h>
main()
{
char s1[]="Ramco";
char s2[]="Systems";
s1=s2;
printf("%s",s1);
}
what will happen if you executed this code? | Ramco | 4 |
| 52.write a “Hello World” program in “c” without using a
semicolon?
53.Give a method to count the number of ones in a 32 bit number?
54.write a program that print itself even if the source file
is deleted?
55.Given an unsigned integer, find if the number is power of 2? | | 6 |
| What is volatile | | 2 |
| how to find string length wihtout using c function? | | 4 |
| identify the in correct expression
a.a=b=3=4;
b.a=b=c=d=0;
float a=int b=3.5;
d.int a;
float b;
a=b=3.5;
| TCS | 5 |
| write an algorithm which can find the largest number among
the given list using binary search ...............
this was asked in the interview | Satyam | 2 |
| 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 |
| CopyBits(x,p,n,y)
copy n LSBs from y to x starting LSB at 'p'th position. | Adobe | 4 |
| what is the use of fflush() function? | | 1 |
| |
| For more C Interview Questions Click Here |