| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| given the piece of code
int a[50];
int *pa;
pa=a;
to access the 6th element of the array which of the
following is incorrect?
a.*(a+5)
b.a[5]
c.pa[5]
d.*(*pa + 5)
| TCS | 5 |
| What is the Difference between Macro and ordinary
definition? | Motorola | 2 |
| Write a program for the following series:
1*3*5-2*4*6+3*5*7-4*6*8+.................up to nterms | Convex-Digital | 4 |
| how to find the binary of a number? | Infosys | 5 |
| program for comparing 2 strings without strcmp() | | 3 |
| write a program to check whether a given integer is a strong
number or not?
[Hint:
145=1!+4!+5!
=1+24+120
=145]
| | 4 |
| WRITE A PROGRAM IN C TO MULTIPLY TWO 2-D ARRAYS | | 4 |
| If we give two names then this displays the connection
between the two people. It is nothing but flames game | | 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 program to compare two strings without using the
strcmp() function | Accenture | 14 |
| can we write a program in c for printf and scanf without
using header file stdio.h | | 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 |
| Explain following declaration
int *P(void);
and
int (*p)(char *a);
| | 2 |
| Find Index of least significant bit set in an Integer. ex.
int value is say 10001000 results should be 4. | | 1 |
| What are .h files and what should I put in them? | | 3 |
| What is the output for the program given below
typedef enum grade{GOOD,BAD,WORST,}BAD;
main()
{
BAD g1;
g1=1;
printf("%d",g1);
}
| ADITI | 3 |
| How do you write a program which produces its own source
code as its output? | | 2 |
| totally how much header files r in c language | TCS | 4 |
| program to get the remainder and quotant of given two
numbers with out using % and / operators? | IBM | 8 |
| can anyone please tell me wat is backlogs... i was looking
for the job openings where i read this.. eligibility
criteria minimum 70% in degree without backlogs. is that
arrear.. if so is it standing arrear or history of
arrears... please help me... | | 4 |
| |
| For more C Interview Questions Click Here |