| Other C Interview Questions |
| |
| Question |
Asked @ |
Answers |
| |
| Given a piece of code
int x[10];
int *ab;
ab=x;
To access the 6th element of the array which of the
following is incorrect?
(A) *(x+5) (B) x[5] (C) ab[5] (D) *(*ab+5} .
|
Oracle | 2 |
| Write a function in c to find the area of a triangle whose length of three sides is given. |
| 2 |
| plz answer..... a program that reads non-negative integer
and computes and prints its factorial |
| 2 |
| Write a C program where input is: "My name is xyz". output
is: "xyz is name My". |
TCS | 1 |
| write the output of following code ..
main()
{
static int a[]={10,20,30,40,50};
int *ptr=a;
static int arr[2][2]={1,2,3,4};
char str[]="ABCD * 4#";
char *s=str+2;
int i,j;
for(i=0;i<5,i++)
printf("%d",*ptr++);
for(i=0;i<2;i++)
for(j=0;j<2;j++)
printf("%d\n",*(*(n+i)+j));
printf("%c\n%c\n%c\n",*(str+2),*s++,*--s);
}
|
| 1 |
| Go through this linked list concept.While traversing through
the singly linked list sometimes the following code snippet
"while(head != NULL)" is used and other times
"while(head->link != NULL)"is used(Here head is the pointer
pointing to the first node,node has two parts data part and
link part).What is the difference between head != NULL and
Head->link != NULL and in which situation are they used? |
Oracle | 1 |
| how to write a program which adds two numbers without using
semicolon in c |
| 2 |
| The postoder traversal is 7,14,3,55,22,5,17 Then ur Inorder
traversal is??? please help me on this |
| 1 |
| 9.how do you write a function that takes a variable number
of arguments? What is the prototype of printf () function?
10.How do you access command-line arguments?
11.what does ‘#include<stdio.h>’ mean?
12.what is the difference between #include<> and #include”…”?
13.what are # pragma staments?
14.what is the most appropriate way to write a
multi-statement macro? |
| 1 |
| wt is d full form of c |
Wipro | 6 |
| can we access one file to one directory? |
| 1 |
| give one ip, find out which contry |
Google | 4 |
| |
| For more C Interview Questions Click Here |