| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| what is the difference between NULL & NUL keywords in C? | | 3 |
| what is the function of void main()? | | 6 |
| 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 |
| What is C language Terminator? | TCS | 12 |
| What is the memory allocated by the following definition ?
int (*x)[10];
| ADITI | 3 |
| Explain the differences between public, protected, private
and internal. | | 1 |
| what are brk, sbrk?
| Oracle | 1 |
| please give me answer with details
#include<stdio.h>
main()
{
int i=1;
i=(++i)*(++i)*(++i);
printf("%d",i);
getch();
} | | 3 |
| what is the output of following question?
void main()
{
int i=0,a[3];
a[i]=i++;
printf("%d",a[i]
} | | 2 |
| Write a C program that computes the value ex by using the
formula
ex =1+x/1!+x2/2!+x3+3!+………….
| | 1 |
| How to add two numbers without using arithmetic operators? | Sapient | 11 |
| differentiate between
const char *a;
char *const a; and
char const *a;
| HCL | 1 |
| In the following code segment what will be the result of the
function,
value of x , value of y
{
unsigned int x=-1;
int y;
y = ~0;
if(x == y)
printf("same");
else
printf("not same");
}
a) same, MAXINT, -1
b) not same, MAXINT, -MAXINT
c) same , MAXUNIT, -1
d) same, MAXUNIT, MAXUNIT
e) not same, MAXINT, MAXUNIT
| IBM | 1 |
| Why doesn't C have nested functions? | | 2 |
| What are .h files and what should I put in them? | | 3 |
| what is the return value (status code) of exit() function....
what the arguments(integer value) passed to it means.... | TCS | 1 |
| what is the diference between pointer to the function and
function to the pointer? | | 2 |
| how can i make a program with this kind of output..
Enter a number: 5
0
01
012
0123
01234
012345
01234
0123
012
01
0 | Wipro | 3 |
| 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 |
| what is the function of .h in #include<stdio.h> in c ? | IBM | 9 |
| |
| For more C Interview Questions Click Here |