Is there something we can do in C but not in C++?

Declare variable names that are keywords in C++ but not C.

Answers were Sorted based on User's Feedback



Is there something we can do in C but not in C++? Declare variable names that are keywords in C++..

Answer / ruth

Aside from a few minor differences, there's nothing C can
do that C++ can't. About the only things I can think of are:

int foo = Something();

int array[ foo ]; // C++ can't do this, but C can IIRC


Of course C++ provides alternatives to do the same thing:

vector<int> array(foo); // similar code in C++


C is more friendy for making external libraries. A DLL
compiled in C will likely work in any C/C++ program made in
any other C/C++ compiler. Whereas DLLs made with C++ often
only work in C++ programs made in the same C++ compiler

Is This Answer Correct ?    4 Yes 1 No

Is there something we can do in C but not in C++? Declare variable names that are keywords in C++..

Answer / lucky

#include<stdio.h>
#include<conio.h>
void main()
{
int class=0;
printf("5d",class);
getch();
}

Is This Answer Correct ?    6 Yes 3 No

Post New Answer

More C Interview Questions

What is declaration and definition in c?

0 Answers  


Lists the benefits of c programming language?

0 Answers  


Why c language?

0 Answers  


Differentiate between ordinary variable and pointer in c.

0 Answers  


Write a routine that prints out a 2-D array in spiral order!

1 Answers   Lucent,






How to print "Hi World" without using semi colon?

6 Answers   Infosys,


write a program to create a sparse matrix using dynamic memory allocation.

0 Answers  


What are header files in c programming?

0 Answers  


What is the difference between memcpy and memmove?

0 Answers  


Write a C program to remove the repeated characters in the entered expression or in entered characters(i.e) removing duplicates

3 Answers  


Write a program to accept a character & display its corrosponding ASCII value & vice versa?

9 Answers  


what is the difference between north western polytechnique university and your applied colleges?? please give ur answers for this. :)

0 Answers  


Categories