| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| explain memory layout of a C program | | 1 |
| 15.what is the disadvantage of using macros?
16.what is the self-referential structure?
17.can a union be self-referenced?
18.What is a pointer?
19.What is the Lvalue and Rvalue?
20.what is the difference between these initializations?
21.Char a[]=”string”;
22.Char *p=”literal”;
23.Does *p++ increment p, or what it points to? | CTS | 2 |
| wats the diference btwen constant pointer and pointer to a
constant.pls give examples. | | 6 |
| write a addition of two no. program with out using
printf,scanf,puts . | | 3 |
| to find out the reverse digit of a given number | Infosys | 5 |
| tell me the full form of c? | | 2 |
| 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 code for large nos multilication (upto 200 digits) | Persistent | 1 |
| helllo sir
give me some information of the basic information the
c as printf ,scanf , %d ,%f and why is the main use of
these. | | 3 |
| consider the following program sigment
int n,sum=1;
switch(n) {
case 2:sum=sum+2;
case 3:sum*=2;
break;
default:sum=0;}
if n=2, what is the value of sum
a.0
b.6
c.3
d.none
| TCS | 4 |
| why java is called as a purely oops language. | | 2 |
| Determine if a number is a power of 2 at O(1). | | 1 |
| Predict the output or error(s) for the following:
25. main()
{
printf("%p",main);
}
| ME | 3 |
| write a c program to accept a given integer value and print
its value in words | | 3 |
| what does the following function print?
func(int i)
{
if(i%2)return 0;
eale return 1;
}
main()
{
int =3;
i=func(i);
i=func(i);
printf("%d",i);}
| TCS | 8 |
| #include<stdio.h>
main()
{
char s1[]="Ramco";
char s2[]="Systems";
s1=s2;
printf("%s",s1);
}
Find the output | CitiGroup | 4 |
| HOW DO YOU HANDLE EXCEPTIONS IN C?
| AppLabs | 2 |
| Why doesn't the code "a[i] = i++;" work? | | 4 |
| find a number whether it is even or odd without using any
control structures and relational operators? | Microsoft | 14 |
| 52.write a “Hello World” program in “c” without using a
semicolon?
53.Give a method to count the number of ones in a 32 bit number?
54.write a program that print itself even if the source file
is deleted?
55.Given an unsigned integer, find if the number is power of 2? | | 6 |
| |
| For more C Interview Questions Click Here |