| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| main()
{
int i=400,j=300;
printf("%d..%d");
}
| ME | 8 |
| struct ptr
{
int a;
char b;
int *p;
}abc;
what is d sizeof structure without using "sizeof" operator?? | Verifone | 8 |
| What's the difference between struct x1 { ... }; and
typedef struct { ... } x2; ?
| | 3 |
| Please list all the unary and binary operators in C. | | 1 |
| char ch="{'H','I',0};printf("%s",ch);what is output | Accenture | 9 |
| plz answer....A program that takes 3 variables e.g a,b,c in
as seperate parameters and rotates the values stored so
that value goes a to b, b to c and c to a . | | 3 |
| Find Error if any in below code, Justify ur answer:
struct xx
{
int a;
struct yy
{
char c;
struct xx* p;
}
struct yy* q;
} | NDS | 3 |
| what is the difference between strcpy() and memcpy() function? | | 1 |
| what is the diff b/w static and non static variables in C.
Give some examples plz. | Wipro | 2 |
| 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 |
| 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 |
| How to calculate Total working time using Login and
logout? | Wipro | 2 |
| Write the program for displaying the ten most frequent words
in a file such that your program should be efficient in all
complexity measures. | Google | 3 |
| write a program that finds the factorial of a number using
recursion? | | 1 |
| a C prog to swap 2 no.s without using variables just an
array? | TCS | 4 |
| write a program to swap bits in a character and return the value
prototype of function
char fun (char a, charb flag c)
where fun returns a char, char a is a the value char b is
the bit to be changed and flag c is the bit value
for eg: x=fun(45,7,0)
since 45 is 0010 0101
and ow x should contain the value 65 (0110 0101) | Bosch | 1 |
| Print all numbers which has a certain digit in a certain
position
eg:
number=45687
1 number=4
2 number=5
etc | | 2 |
| What's wrong with the call "fopen ("c:\newdir\file.dat", "r")"? | | 1 |
| what are the uses of structure? | HCL | 5 |
| main()
{
char *p;
p="Hello";
printf("%c\n",*&*p);
}
| ME | 2 |
| |
| For more C Interview Questions Click Here |