| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| write the program for maximum of the following numbers?
122,198,290,71,143,325,98 | | 4 |
| what is array? | | 6 |
| write a “Hello World” program in “c” without using a semicolon? | | 3 |
| Write a c code segment using a for loop that calculates and
prints the sum of the even integers from 2 to 30, inclusive? | | 2 |
| How to add two numbers without using arithmetic operators? | Sapient | 11 |
| which of the following statements is incorrect
a.typedef struct new{
int n1;
char n2;
} DATA;
b.typedef struct {
int n3;
char *n4;
}ICE;
c.typedef union {
int n5;
float n6;
} UDT;
d.#typedef union {
int n7;
float n8;
} TUDAT;
| TCS | 5 |
| struct ptr
{
int a;
char b;
int *p;
}abc;
what is d sizeof structure without using "sizeof" operator?? | Verifone | 8 |
| write a recursive program in'c'to find whether a given five
digit number is a palindrome or not | | 1 |
| if array a conatins 'n' elements and array b conatins 'n-1'
elements.array b has all element which are present in array
a but one element is missing in array b. find that
element. | Zycus-Infotech | 9 |
| How can I call a function, given its name as a string? | ABC-Telecom | 2 |
| Go through the following code sinippet
char a[20];
a="Hello Orcale Test";
will this compile?
| Oracle | 3 |
| how to impliment 2 or more stacks in a single dimensional
array ? | iFlex | 1 |
| WAP – represent a char in binary format
| Motorola | 4 |
| Result of the following program is
main()
{
int i=0;
for(i=0;i<20;i++)
{
switch(i)
case 0:i+=5;
case 1:i+=2;
case 5:i+=5;
default i+=4;
break;}
printf("%d,",i);
}
}
a)0,5,9,13,17
b)5,9,13,17
c)12,17,22
d)16,21
e)syntax error
| IBM | 4 |
| 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 |
| int a=1,b=2,c=3;
printf("%d,%d",a,b,c);
What is the output?
| Verifone | 14 |
| 12. 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 | 4 |
| Is reference used in C? | | 1 |
| can we access one file to one directory? | | 1 |
| 1
232
34543
4567654
can anyone tell me how to slove this c question | | 3 |
| |
| For more C Interview Questions Click Here |