ALTER placement papers ------- placement paper-1

Answer Posted / guest

ALTER placement papers

C questions

1. int b=10;
int *p=&b;
*p++;
printf("%d",*p);
what is the output?

2. What is the difference between malloc,
calloc and realloc?

3. What does malloc return in C and C++?

4. main()
{
char *a="hello";
char *b="bye";
char *c="hai";
int x=10,y=100;
c=(x<y>)?a:b;
printf("%s",c);
}
whats the output?

5. void main()
{
int a,b;
a=sumdig(123);
b=sumdig(123);
printf("%d %d",a,b);
}
int sumdig(int n)
{
static int sum;
int d;
if(n!=0)
{
d=n%10;
n=(n-d)/10;
sum=sum+d;
sumdig(n);
}
else
return s;
}
what is the output?

6. Declare a pointer to a function that
takes a char pointer
as argument and returns a void pointer.

7. How do we open a binary file in
Read/Write mode in C?

C++ questions

8. class A
{
public:
A()
{
}
~A();
};
class derived:public A
{
derived();
};
what is wrong with this type of declaration?

9. what do you mean by exception
handling?

10. What are "pure virtual" functions?

11. What is the difference between member
functions and
static member functions?

12. What is the4 difference between delete[]
and delete?

13. Question on Copy constructor.

14. What are namespaces?

15. One question on namespace.

16. What are pass by valu and pass by
reference?
what is the disadvantage of pass by value?
I didnt get this. if you have the answer plz tell me.

17. How to invoke a C function using a C++
program?

18. char *str;
char *str1="Hello World";
sscanf(str1,"%s",str);
what is the output?

19. Difference between function overloading
and function overriding.

20. There is a base class sub, with a member
function fnsub(). There are
two classes super1 and super2 which are subclasses of the
base class sub.
if and pointer object is created of the class sub which
points to any
of the two classes super1 and super2, if fnsub() is called
which one
will be inoked?

ALTER placement papers

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Recently conducted Apptitude test

1405


what is bidirectional?

1384


printf("%d",printf("%d",printf("%d",printf("%s","ILOVECPROGRAM")))); whats the output

1390


speak 1min on topic Travelling,memorable moment ,memorable day?

1736


my question is : reverse a string in COBOL program (please write a code asap) input file: 1234abcdef abc*$#1___ cdef____ghi a_z_k_h___ 4_3_2_1___ ______5678 output file: 8765_____ 1_2_3_4__ h_k_z_a__ ihg____ghi 1#$*cba__ fedcb4321

1186






what you will do when you struck in traffic ?

1042


A frog wants to climb a pole which is 15 feet in height, frog can jump 3 feet every minute after which he rests for a minute where he slips down 2 feet. How much time will the frog take to reach the top of the pole?

591


What kind of Issues/bugs arise in ETL projects? I would like to know few issues (critical to somewhat bugs ) normally occur in ETL process especially when testing? Domains can be banking, retail or any.

1421


what is the use of air in gc

1430


your project to describe and tell about : 1. My favorite things 2. My favorite places at home 3. Animals *Choose one of them to describe *Write on your paper *If you done, Send me *Did you get it

782


email me previous question papers of bob bank for po exams

2057


i want the sample placement paper of goldman sachs urgently. please send it to me

3921


what is difference between uv and visible spectroscopy and how to differentiate the drug compounds in uv visible region

1587


Do we have vacancy for HR RECRUITER ?

1376


Hi.. Guys Im pranitha, presently im working in a organisation & im look for job at MNC's like DELL, Delloitte, Bank of America, Genpect, etc., I have completed B.com . Pls help me...

1138