| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| 2.main
{
int x,j,k;
j=k=6;x=2;
x=j*k;
printf("%d", x);
| HCL | 6 |
| please give me some tips for the selection in TCS. | TCS | 3 |
| what is the diff between the printf and sprintf functions??
and what is the syntax for this two functions ?? | | 4 |
| What is structure padding ? | HP | 1 |
| #define f(x)
main()
{
printf("\n%d",f(2+2));
} | | 3 |
| how we can make 3d venturing graphics on outer interface | Microsoft | 1 |
| How can I invoke another program from within a C program? | | 1 |
| How would you find a cycle in a linked list?
| | 2 |
| Write a program for deleting duplicate elements in an array | Subex | 1 |
| write a code for large nos multilication (upto 200 digits) | Persistent | 1 |
| 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 |
| 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 | 2 |
| Give the output for the following program.
#define STYLE1 char
main()
{
typedef char STYLE2;
STYLE1 x;
STYLE2 y;
clrscr();
x=255;
y=255;
printf("%d %d\n",x,y);
}
| ADITI | 1 |
| logic for generating all the combinations of the any number
of given letters.
ex:::::::::
if a,b,c,d are given the o/p should be
abcd,dcba,dbac,bcad,................
4*3*2*1 combinations............ | Infosys | 1 |
| Given an array of length N containing integers between 1
and N, determine if it contains any duplicates. | | 2 |
| long int size
a) 4 bytes b) 2 bytes c) compiler dependent d) 8 bytes
| HCL | 10 |
| What are Storage Classes in C ? | HP | 6 |
| How can I convert integers to binary or hexadecimal? | | 2 |
| write a program for odd numbers? | | 5 |
| write a C code
to reverse a string using a recursive function, without
swapping or using an extra memory.
| Motorola | 2 |
| |
| For more C Interview Questions Click Here |