| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| Find Error if any in below code, Justify ur answer:
struct xx
{
int a;
struct yy
{
char c;
struct xx* p;
}
struct yy* q;
} | NDS | 3 |
| write a 'c' program to sum the number of integer values | | 5 |
| C program to perform stack operation using singly linked list | | 1 |
| What does a run-time "null pointer assignment" error mean? | | 2 |
| how many header file is in C language ? | | 14 |
| How do I declare an array of N pointers to functions
returning pointers to functions returning pointers
to characters?
| | 1 |
| void main()
{int a[5],i,b=16;
for(i=0;i<5;i++)
a[i]=2*i;
f(a,5,b);
for(i=0;i<5;i++)
printf("\n %d",a[i]);
printf("\n %d",b);
}
f(int *x,int n,int y)
{
int i;
for(i=0;i<n;i++)
*(x+i)+=2;
y=y+2;
}wat r the errors in the prg.and improvise the prg to get o/p.? | | 2 |
| How many types of linked lists what are they?
How many types of data structures? | BSNL | 5 |
| 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 |
| write a program to find the sum of the array elements in c
language? | | 8 |
| value = 0xabcd;
for (loop = 1; (value >> 1) & 1 | loop & 1; loop++) {
foo();
if (loop & 1)
value >>= 1;
}
how many times is foo() executed? | Google | 5 |
| how to create c progarm without void main()? | | 1 |
| declare afunction pointer to int printf(char *)? | HCL | 1 |
| What are .h files and what should I put in them? | | 3 |
| I have a function which accepts, and is supposed to
initialize,a pointer, but the pointer in the caller remains
unchanged. | | 1 |
| What's wrong with the call "fopen ("c:\newdir\file.dat", "r")"? | | 1 |
| 44.what is the difference between strcpy() and memcpy()
function?
45.what is output of the following statetment?
46.Printf(“%x”, -1<<4); ?
47.will the program compile?
int i;
scanf(“%d”,i);
printf(“%d”,i);
48.write a string copy function routine?
49.swap two integer variables without using a third
temporary variable?
50.how do you redirect stdout value from a program to a file?
51.write a program that finds the factorial of a number
using recursion? | | 3 |
| Hai why 'c' is the middle language | | 2 |
| i want to know aptitude questions,technical questions | | 2 |
| write a Program to dispaly upto 100 prime numbers(without
using Arrays,Pointer) | Wipro | 7 |
| |
| For more C Interview Questions Click Here |