| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| what is the difference between declaration ,defenetion and
initialization of a variable? | LG-Soft | 5 |
| Give a fast way to multiply a number by 7 | Microsoft | 8 |
| How many ways are there to swap two numbers without using
temporary variable? Give the each logic. | | 6 |
| what are the uses of structure? | HCL | 5 |
| what does " calloc" do? | Cadence | 6 |
| write the program for prime numbers? | TCS | 10 |
| void main()
{
int s[4][2]={ {1234,56},{1212,33},{1434,80},{1312,78} };
int (*p)[2];
int i,j,*pint;
for(i=0;i<=3;i++)
{
p=&s[i];
pint=p;
printf("\n");
for(j=0;j<=1;j++)
printf("%d",*(pint+j));
}
} while running this program it shows a warning-suspicious
pointer conversion ie pint=p; my que is why should we assign
the value of p to pint again.why cant we use it directly as
*(p+j)..but if i use like tat the o/p is garbage value.. | | 1 |
| what is self refrential structure | HCL | 2 |
| #include<stdio.h>
main()
{
char s1[]="Ramco";
char s2[]="Systems";
s1=s2;
printf("%s",s1);
}
Find the output | CitiGroup | 4 |
| write a programe returns the number of times the character
appears in the string | | 1 |
| Determine if a number is a power of 2 at O(1). | | 1 |
| what is difference between array and structure?
| TCS | 19 |
| pgm to reverse string using arrays i.e god is love becomes
love is god)
(assumption:only space is used for seperation of words)
no addtional memory used.i.e no temporary arrays can used. | Persistent | 4 |
| Convert the following expression to postfix and prefix
X $ Y Z - M + N + P / Q / (R + S)
| | 2 |
| write a program to print the all 4digits numbers & whose
squares must me even numbers? | Virtusa | 2 |
| Write a program for the following series?
1
121
12321
1234321
123454321
12345654321
1234567654321
123456787654321
12345678987654321
1234567890987654321
123456789010987654321
12345678901210987654321
1234567890123210987654321
.........1234321............
..........123454321............
..........12345654321............
7
8
9
0
1
Pls............? | | 2 |
| How can I access memory located at a certain address? | | 2 |
| What is meaning of "Void main" in C Language. | TCS | 8 |
| how to find turn around time in operating system? | | 1 |
| how to find the kth smallest element in the given list of
array elemnts.
| Silicon | 5 |
| |
| For more C Interview Questions Click Here |