Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Is there something that we can do in C and not in C++?

Answers were Sorted based on User's Feedback



Is there something that we can do in C and not in C++?..

Answer / dangling pointer

try this one
int *x=malloc(10);
it works in c but not in c++ reason is we will have to
explicitly cast in c++ to convert a void* to another type
to work.

Is This Answer Correct ?    5 Yes 0 No

Is there something that we can do in C and not in C++?..

Answer / dheeraj sharma

in c we can assign we can assign void pointer to any type of
pointor varible without typecasting.,but we cant do it in
C++,because C++ does not allow type mismatch.

same case with enum also.in C we can assign integer to enum
member directly,but in C++ we have to typecast integer first
with enum variable.

Is This Answer Correct ?    2 Yes 0 No

Is there something that we can do in C and not in C++?..

Answer / bhushan bastwade

We can have variable names as class,new,operator in C but not in C++ as they are keywords in C++.
For more have a look on this
http://www.geeksforgeeks.org/write-c-program-wont-compiler-c/

Is This Answer Correct ?    2 Yes 0 No

Is there something that we can do in C and not in C++?..

Answer / achal ubbott

One important difference between c and c++ is that c
compilers are loosely coupled. So it does not perform type
checking that much strictly and can allow some conversions
which otherwise most c++ compilers would not allow.

Is This Answer Correct ?    1 Yes 0 No

Is there something that we can do in C and not in C++?..

Answer / zarra

C++ will not allow declaration without initialization but C
will allow declaration without initialization.

And C++ and C both will not allow later initialization.

Is This Answer Correct ?    1 Yes 0 No

Is there something that we can do in C and not in C++?..

Answer / guest

Theoratically it is being said that we cannot call main
recursively(main caling main) in c++, but practically it can
be done.

whereas in c, we can call main in main.

Is This Answer Correct ?    7 Yes 7 No

Is there something that we can do in C and not in C++?..

Answer / faisal saifi

C++ retained all features of C programming in addition of
object oriented programming that use OBJECT and a CLASS so
there is nothing that happen in C but not in C++;

Is This Answer Correct ?    2 Yes 2 No

Is there something that we can do in C and not in C++?..

Answer / shweta iyer

Yes. We can create class in C++ but cannot do so in C.

Is This Answer Correct ?    0 Yes 0 No

Is there something that we can do in C and not in C++?..

Answer / som

In C the const variables can be declared and can allocate
the value later.
For ex:
const int i;
i = 7;

This will work in c, but c++ will give compilation error.

Is This Answer Correct ?    0 Yes 2 No

Is there something that we can do in C and not in C++?..

Answer / prathap

every C program is execute in C++.
From the above reason we can understand that every thing in
C we have in c++ also.
so Answer is NOTHING

Is This Answer Correct ?    1 Yes 6 No

Post New Answer

More C++ General Interview Questions

How can you say that a template is better than a base class?

0 Answers  


1. What does the following do: void afunction(int *x) { x=new int; *x=12; } int main() { int v=10; afunction(&v); cout<<v; } a) Outputs 12 b) Outputs 10 c) Outputs the address of v

5 Answers   Quark,


"How will you merge these two arrays? Write the program Array: A 1 18 22 43 Array: B 3 4 6 20 34 46 55 Output Array: C 1 3 4 6 18 20 22 34 43 46 55"

9 Answers   College School Exams Tests, HCL,


What is virtual base class?

0 Answers  


What is an undefined behavior and sequence points

0 Answers  


what do you mean by volatile variable?

0 Answers  


Do you know the use of vtable?

0 Answers  


What is the use of volatile variable?

0 Answers  


Should I learn c++ c?

0 Answers  


What is binary object model?

0 Answers  


If dog is a friend of boy, and terrier derives from dog, is terrier a friend of boy?

0 Answers  


In which header file does one find isalpha() a) conio.h b) stdio.h c) ctype.h

0 Answers  


Categories