what is difference between c and c++
Answers were Sorted based on User's Feedback
Answer / vignesh1988i
C C++
1) C is an structured oriented object oriented lang.
language
2) C use structures where no here it contains classes
function and data's inside where it contains both data's
involved . only outside we as well as member functions
can write functions and
initilization could be done
3) variables should be wherever we wann we can
initilized on the first line initilize the variable
after the main function
Is This Answer Correct ? | 9 Yes | 0 No |
C
1)Structured programing.
2)In build functions are used to allocate the memory dynamically.
3)Struct members are public by default.
4)Data and functions are separated.
C++
1)Object oriented programing.
2)New ,Delete operators are used to allocate the memory dynamically
3)class members are private by default.
4)Together data and functions into single entity.
Is This Answer Correct ? | 9 Yes | 0 No |
Answer / sandeep kumar
C
1)It is structured language
2)It follows Top-down approach
3)large programs are divided into small programs called
functions
4)data move openly from one function to other function
C++
1)It is a Object oriented language
2)It is not compulsory to be top-down procedure
3)large program is divided into small objects
4)data cant be accessed by external functions easily
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / tapan pal
C
1)Structured programing.
2)In build functions are used to allocate the memory
dynamically.
3)Struct members are public by default.
4)Data and functions are separated.
C++
1)Object oriented programing.
2)New ,Delete operators are used to allocate the memory
dynamically
3)class members are private by default.
4)Together data and functions into single entity.
Is This Answer Correct ? | 1 Yes | 1 No |
How to add two numbers without using arithmetic operators?
18 Answers College School Exams Tests, e track, Infosys, Pan Parag, Sapient, TCS,
What does #pragma once mean?
What is meant by high-order and low-order bytes?
Is c is a high level language?
What is hungarian notation? Is it worthwhile?
What would be an example of a structure analogous to structure c?
What is file in c preprocessor?
What’s the special use of UNIONS?
#include<stdio.h> #include<conio.h> void main() {clrscr(); char another='y'; int num; for(;another=='y';) { printf("Enter a number"); scanf("%d",&num); printf("squre of %d is %d",num,num*num); printf("\nwant to enter another number y/n"); scanf("%c",&another); } getch(); } the above code runs only one time.on entering 'y' the screen disappeares.what can i do?
What are the advantages of using Unions?
Explain why C language is procedural?
Write a function stroverlap that takes (at least) two strings, and concatenates them, but does not duplicate any overlap. You only need to worry about overlaps between the end of the first string and the beginning of the second string. Examples: batman, manonthemoon = batmanonthemoon batmmamaman, mamamanonthemoon = batmmamamanonthemoon bat, man = batman batman, batman = batman batman, menonthemoon = batmanmenonthemoon