| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| what is the difference between c and java? | | 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 |
| which one low Priority in c?
a)=,b)++,c)==,d)+ | | 8 |
| Why preprocessor should come before source code?
| | 2 |
| WRITE A PROGRAM TO PRINT THE FOLLOWING OUTPUTS USING FOR
LOOPS.
A) * B) *****
*** * *
***** * *
***** | | 2 |
| Explain in detail how strset (string handling function
works )pls explain it with an example. | | 1 |
| study the code:
#include<stdio.h>
void main()
{
const int a=100;
int *p;
p=&a;
(*p)++;
printf("a=%dn(*p)=%dn",a,*p);
}
What is printed?
A)100,101 B)100,100 C)101,101 D)None of the
above | Accenture | 13 |
| find a number whether it is even or odd without using any
control structures and relational operators? | Microsoft | 14 |
| What will be the result of the following program?
main()
{
char p[]="String";
int x=0;
if(p=="String")
{
printf("Pass 1");
if(p[sizeof(p)-2]=='g')
printf("Pass 2");
else
printf("Fail 2");
}
else
{
printf("Fail 1");
if(p[sizeof(p)-2]=='g')
printf("Pass 2");
else
printf("Fail 2");
}
}
a) Pass 1, Pass 2
b) Fail 1, Fail 2
c) Pass 1, Fail 2
d) Fail 1, Pass 2
e) syntax error during compilation
| IBM | 10 |
| Find string palindrome 10marks
| Honeywell | 5 |
| Which of the following about automatic variables within a
function is correct ?
a.its type must be declared before using the variable
b.they are local
c.they are not initialised to zero
d.they are global.
| TCS | 3 |
| How can I access memory located at a certain address? | | 2 |
| wt is d full form of c | Wipro | 1 |
| what is difference between array and structure?
| TCS | 19 |
| the format specified for hexa decimal is
a.%d
b.%o
c.%x
d.%u
| TCS | 4 |
| What is the difference between null pointer and void pointer | CTS | 3 |
| x=2,y=6,z=6
x=y==z;
printf(%d",x)
| HCL | 8 |
| Write a C program to print 1 2 3 ... 100 without using
loops? | | 5 |
| difference between function & structure | Verizon | 5 |
| char ch="{'H','I',0};printf("%s",ch);what is output | Accenture | 9 |
| |
| For more C Interview Questions Click Here |