| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| Find the middle node in the linked list??
(Note:Do not use for loop, count and count/2) | Subex | 2 |
| To what value are pointers initialized?
1) NULL
2) Newly allocated memory
3) No action is taken by the compiler to initialize
pointers.
| | 2 |
| 2. Counting in Lojban, an artificial language developed
over the last fourty years, is easier than in most languages
The numbers from zero to nine are:
0 no
1 pa
2 re
3 ci
4 vo
5 mk
6 xa
7 ze
8 bi
9 so
Larger numbers are created by gluing the digit togather.
For Examle 123 is pareci
Write a program that reads in a lojban string(representing
a no less than or equal to 1,000,000) and output it in
numbers.
| Nagarro | 2 |
| where does malloc() function get the memory? | | 1 |
| how to generate sparse matrix in c | | 1 |
|
#include<stdio.h>
int SumElement(int *,int);
void main(void)
{
int x[10];
int i=10;
for(;i;)
{
i--;
*(x+i)=i;
}
printf("%d",SumElement(x,10));
}
int SumElement(int array[],int size)
{
int i=0;
float sum=0;
for(;i<size;i++)
sum+=array[i];
return sum;
}
output? | Ramco | 5 |
| what is the difference between #include<stdio.h> and
#include"stdio.h" ? | TCS | 5 |
| Tell us the difference between these two :
#include"stdio.h"
#include<stdio.h>
define in detial. | | 4 |
| main()
{int a=200*200/100;
printf("%d",a);
} | TCS | 7 |
| how to create c progarm without void main()? | | 1 |
| what are the static variables
| HCL | 7 |
| How to add two numbers without using arithmetic operators? | Sapient | 11 |
| Which of the following sorts is quickest when sorting the
following set: 1 2 3 5 4
1) Quick Sort
2) Bubble Sort
3) Merge Sort
| | 5 |
| dynamically allocate memory for linear array of n
integers,store some elements in it and find some of them | | 1 |
| related to rdbms query . | | 1 |
| C,c++, Java is all are structural oriented or procedure
oriented language..? | | 3 |
| How the C program can be compiled? | HP | 7 |
| What is external and internal variables
What is dynamic memory allocation
what is storage classes in C | | 2 |
| what will the following program do?
void main()
{
int i;
char a[]="String";
char *p="New Sring";
char *Temp;
Temp=a;
a=malloc(strlen(p) + 1);
strcpy(a,p);
//Line no:9//
p = malloc(strlen(Temp) + 1);
strcpy(p,Temp);
printf("(%s, %s)",a,p);
free(p);
free(a);
}
//Line no 15//
a) Swap contents of p & a and print:(New string, string)
b) Generate compilation error in line number 8
c) Generate compilation error in line number 5
d) Generate compilation error in line number 7
e) Generate compilation error in line number 1
| IBM | 1 |
| What are the preprocessors? | HP | 6 |
| |
| For more C Interview Questions Click Here |