| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| What are volatile variables? | | 1 |
| what is dangling pointer? | LG-Soft | 1 |
| I have a function which accepts, and is supposed to
initialize,a pointer, but the pointer in the caller remains
unchanged. | | 1 |
| how does the C compiler interpret the following two statements
p=p+x;
q=q+y;
a.p=p+x;
q=q+y
b.p=p+xq=q+y
c.p=p+xq;
q=q+y
d.p=p+x/q=q+y
| TCS | 3 |
| How to add two numbers with using function?
| | 3 |
| 1,4,8,13,21,30,36,45,54,63,73,?,?. | Franklin-Templeton | 5 |
| what is a far pointer | TCS | 9 |
| how does printf function work | | 1 |
| pick out the odd one out of the following
a.malloc()
b.calloc()
c.free()
d.realloc()
| TCS | 1 |
| what is the output of the following program?
main()
{
int i=-1,j=-1,k=0,l=2,m;
m=i++&&j++&&k++||l++;
printf("%d %d %d %d %d",i,j,k,l,m);
} | | 7 |
| how to make program without <> in library.
| ADITI | 1 |
| What is true about the following
C Functions
a.Need not return any value
b.Should always return an integer
c.Should always return a float
d.Should always return more than one value.
| TCS | 7 |
| dennis ritchie invented C language in AT&T bell laboratory
what is the extension of AT&T? | | 1 |
| 2.Given the short c program that follows
a. make a list of the memory variables in this program
b.which lines of code contain operations that change the
contents of memory? what are those operations?
Void main( void)
{
Double base;
Double height;
Double area;
Printf(“enter base and height of triangle :”);
Scanf(“%lg”, &base);
Scanf(“%lg”, &height);
Area=base*height/2.0;
Printf(“the area of the triangle is %g \n”,area);
}
| Wipro | 1 |
| Which of the Following will define a type NODE that is a
node in a Linked list?
A)struct node {NODE*next;int x;};type def struct node NODE;
B)typedef struct NODE {struct NODE *next;int x;};
C)typedef struct NODE {NODE *next;int x;};
D)typedef struct {NODE *next;int x;}NODE;
| Accenture | 4 |
| WRITE A C PROGRAM TO FIND SECOND BIGGEST VALUE FROM THE
GIVEN VALUES | | 1 |
| What is the output of the following program
#include<stdio.h>
main()
{
int i=0;
fork();
printf("%d",i++);
fork();
printf("%d",i++);
fork();
wait();
} | ADITI | 5 |
| what is the difference between declaration ,defenetion and
initialization of a variable? | LG-Soft | 5 |
| write the function int countchtr(char string[],int
ch);which returns the number of timesthe character ch
appears in the string. for example the call countchtr("she
lives in Newyork",'e') would return 3. | | 4 |
| How can I get Single byte from 'int' type variable? Can we
alter single bit or multiple bits in int type variable? if so,
How? | | 2 |
| |
| For more C Interview Questions Click Here |