| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| #define min((a),(b)) ((a)<(b))?(a):(b)
main()
{
int i=0,a[20],*ptr;
ptr=a;
while(min(ptr++,&a[9])<&a[8]) i=i+1;
printf("i=%d\n",i);}
| | 3 |
| why division operator not work in case of float constant? | | 1 |
| Switch (i)
i=1;
case 1
i++;
case 2
++i;
break;
case 3
--i;
Output of i after executing the program
| Mascot | 4 |
| Who had beaten up hooligan "CHAKULI" in his early college days? | | 1 |
| read the folllowing code
# define MAX 100
# define MIN 100
....
....
if(x>MAX)
x=1;
else if(x<MIN)
x=-1;
x=50;
if the initial value of x=200,what is the vlaue after
executing this code?
a.200
b.1
c.-1
d.50
| TCS | 2 |
| What does the message "warning: macro replacement within a
string literal" mean? | | 1 |
| how to implement stack operation using singly linked list | | 1 |
| writw a program to insert an element in the begning of a
doubly linked list | | 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 |
| What are the preprocessors? | HP | 6 |
| the format specified for hexa decimal is
a.%d
b.%o
c.%x
d.%u
| TCS | 4 |
| without using arithmatic operator solve which number is
greater?????????? | | 1 |
| simple c program for 12345 convert 54321 with out using string | | 5 |
| main is a predefined or user define function
if user defined why?
if predefined whay? | TCS | 2 |
| define function | Assurgent | 4 |
| main()
{
int arr[5]={23,67};
printf("%d%d%d",arr[2],arr[3],arr[4]);
} | TCS | 6 |
| Write a program to remove the C comments(/* */) and C++
comments(//) from a file.
The file should be declared in command line. | Subex | 2 |
| I have a function which accepts, and is supposed to
initialize,a pointer, but the pointer in the caller remains
unchanged. | | 1 |
| what are the general concepts of c and c++ | | 1 |
| write a C code To reverse a linked list | Motorola | 2 |
| |
| For more C Interview Questions Click Here |