| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| how to implement stack work as a queue? | | 2 |
| Write a program to print this triangle:
*
**
*
****
*
******
*
********
*
**********
Don't use printf statements;use two nested loops instead.
you will have to use braces around the body of the outer
loop if it contains multiple statements. | | 1 |
| write a program to find the number of even integers and odd
integers in a given array in c language | Olive-Tech | 2 |
| What are the phases in s/w developed life cycle?
wat is the diff b/w stack & queue...where do we use stack | | 5 |
| When you call malloc() to allocate memory for a local
pointer, do you have to explicitly free() it? | | 2 |
| int i;
i=2;
i++;
if(i=4)
{
printf(i=4);
}
else
{
printf(i=3);
}
output of the program ?
| Mascot | 5 |
| What does a run-time "null pointer assignment" error mean? | | 2 |
| the format specified for hexa decimal is
a.%d
b.%o
c.%x
d.%u
| TCS | 3 |
| 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 | 4 |
| fun(int x)
{
if(x > 0)
fun(x/2);
printf("%d", x);
}
above function is called as:
fun(10);
what will it print?
} | NDS | 12 |
| what is the difference between declaration ,defenetion and
initialization of a variable? | LG-Soft | 4 |
| how to find turn around time in operating system? | | 1 |
| Look at the Code:
#include<string.h>
void main()
{
char s1[]="abcd";
char s2[10];
char s3[]="efgh";
int i;
clrscr();
i=strcmp(strcat(s3,ctrcpy(s2,s1))strcat(s3,"abcd"));
printf("%d",i);
}
What will be the output?
A)No output B) A Non Integer C)0 D) Garbage
| Accenture | 4 |
| what is difference between array and structure?
| TCS | 9 |
| what is the use of pointers | | 4 |
| What are advantages and disadvantages of recursive
calling ? | HP | 6 |
| Go through the following code sinippet
char a[20];
a="Hello Orcale Test";
will this compile?
| Oracle | 2 |
| How can I call a function, given its name as a string? | ABC-Telecom | 1 |
| f1()
{
f(3);}
f(int t)
{
switch(t);
{
case 2: c=3;
case 3: c=4;
case 4: c=5;
case 5: c=6;
default: c=0;}
value of c?
| Geometric-Software | 5 |
| Reverse the part of the number which is present from
position i to j. Print the new number.[without using the array]
eg:
num=789876
i=2
j=5
778986 | | 2 |
| |
| For more C Interview Questions Click Here |