| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| Convert the following expression to postfix and prefix
(A+B) * (D-C) | | 1 |
| WHAT IS THE DIFFERENCE BETWEEN malloc() and calloc() in c
file management?
| | 3 |
| What is the value of y in the following code?
x=7;y=0;
if(x=6)
y=7;
else
y=1;
| TCS | 10 |
| Sir i want e-notes of C languge of BAlaguruswami book i.e
scanned or pdf file of balaguruswamy book on c
language.PLEASE SEND ME on my mail id ajit_kolhe@rediff.com
| | 2 |
| parkside's triangle..
create a program like this..
enter the size: 6
enter the seed: 1
output:
1
23
456
7891
23456
789123
sample2:
enter the size: 5
enter the seed: 3
output:
3
45
678
9123
45678
parkside should not exceed 10 while its seed should only be
not more than 9.. | | 3 |
| 1
232
34543
4567654
can anyone tell me how to slove this c question | | 3 |
| #define min((a),(b)) ((a)<(b))?(a):(b)
main()
{
int i=0,a[20],*ptr;
ptr=a;
while(min(ptr++,&a[9])<&a[8]) i=i+1;
printf("i=%d\n",i);}
| | 2 |
| what will be the result of the following program ?
char *gxxx()
{
static char xxx[1024];
return xxx;
}
main()
{
char *g="string";
strcpy(gxxx(),g);
g = gxxx();
strcpy(g,"oldstring");
printf("The string is :
%s",gxxx());
}
a) The string is : string
b) The string is :Oldstring
c) Run time error/Core dump
d) Syntax error during compilation
e) None of these
| IBM | 2 |
| write a fuction for accepting and replacing lowercase
letter to'Z' with out using inline function. | Temenos | 3 |
| palindrome for strings and numbers----Can anybody do the
prog? | TCS | 5 |
| 11. 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 | 5 |
| Write a program to interchange two variables without using
the third variable? | Accenture | 9 |
| what is a function pointer and how all to declare ,define
and implement it ??? | Honeywell | 3 |
| what are the static variables
| HCL | 7 |
| There are 3 baskets of fruits with worng lables,one basket
has apple,another basket has orange,another has combination
of apple and orange,what is the least way of interchange
the lables. | Google | 8 |
| What's the best way to declare and define global variables? | | 2 |
| How to add two numbers without using arithmetic operators? | Sapient | 7 |
| 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? | | 2 |
| What are .h files and what should I put in them? | | 3 |
| WAP to accept basic salary of an employee?
Calculate it HRA=25%,DA=30%,PF=30%&net salary display all
contents? | | 3 |
| |
| For more C Interview Questions Click Here |