1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
amm1812
2 years ago
15

What is the difference between C and C++. If I know C, will it be hard to lean C++?

Computers and Technology
1 answer:
Jobisdone [24]2 years ago
4 0

Explanation:

The difference between c and c++  are given below

(1) C does not support object oriented programming structure while c++ supports  object oriented programming structure.

(2) C does not support namespace concept while c++ support namespace concept

(3) C has a procedural language it means it follow top down approach while  C++ is object oriented it means it follow bottom up approach

(4) C does not support virtual function concept while C++ support  virtual function concept

( 5) The programming structure of c language is given below  

   #include<stdio.h> // header file

  void main()  //main method

{

//statement

}

Programming structure of C++

#include<iostream> // header file

 using namespace std;  // namespace

void main()  // main method

{

// statement

}

If anyone know C, will it be not hard to learn C++ because only the syntax will change but the logic of programming is not changed .The operator and most concept are similar in both the languages.

You might be interested in
What are threats to computer system
4vir4ik [10]
Breach..
bugs and viruses
hack
3 0
3 years ago
Read 2 more answers
Canada’s energy plan, named __________, makes three governmental agencies accountable for safeguarding Canada’s environment.
stepan [7]

Answer:

Canada launched the national Generation Energy Council of leading Canadians, who proposed principles to the Government of Canada on how to build our energy future. Today, these principles guide government decisions to support Canadian families, businesses, and communities. Together, we are: saving energy powering clean communities.

Explanation:

8 0
2 years ago
Your company has 1,000 users in a Microsoft Office 365 subscription. A Power BI administrator named Admin1 creates 20 dashboards
AysviL [449]

Answer:

Yes, it is.

Explanation:

Yes it will surely achieve the goal. When there is no license for user, then he/she will not access the dashboard.

7 0
2 years ago
Which of the following is a basic principle of improvement?
lesya [120]

From the given the statement, "every system is perfectly designed to get the results it gets" is a basic principle of improvement.

Option B

<u>Explanation:</u>

The improvement activity begins with the quote ‘every system is perfectly designed to get the results it gets’, by W. Edwards Deming; The quote states both the unintended and intended effects are designed into our systems.

For example: Healthcare in the UK has been perfectly designed to lower the waiting times to 18 weeks for various procedures over last twelve years. Reflecting on Safer Patients Initiative (SPI), this can be true to improvement systems: every improvement system is perfectly designed to get the results its gets and SPI is a case in point.

The leading improvements that need to be designed into our improvement systems:

  • Improvement activity needs to be built on strong foundations
  • Greater engagement with people’s intrinsic motivation
  • Embrace a wider set of methods
  • Greater understanding of how systems and processes outside direct clinical care contribute to safety and quality.

So, it can be concluded that the line given by W. Edwards Deming tends to be the principle of improvement.

6 0
3 years ago
This program is to compute and write to a file the GPA for student scores read from an input file. The point values of the grade
VARVARA [1.3K]

Answer:

#Take input from the user

filename=input('Enter name of input file: ')

total_units=0#Total number of units for a student

total_score=0#Total score of a student

#Assign a score to each grade. I have reduced 0.33 for each grade. Change here if you need to

grade={'A':4.0,'A-':3.67,'B+':3.34,'B':3.01,'B-':2.68,'C+':2.35,'C':2.02,'C-':1.69,'D+':1.36,'D':1.03}

try:

with open(filename,"r") as input_file:#Open the file for input(reading)

output_file=open("GPA_output.txt","w") #Create and open GPA_output.txt if it doesn't exist for writing

for student_record in input_file:#read from input file

if("," in student_record):#if there is a , that means this is the student name

student_name=student_record.strip('\n')#Remove \n from student name

continue

else:

if(" " in student_record):#If a line contains spaces then its the student's grades for a course

student=student_record.split(" ")#Split to find the coursename, units and grade

#student[0]=coursename student[1]=units student[2]=grade

total_units+=int(student[1])#Calculate total units for 1 student

total_score+=int(student[1])*grade[student[2].strip('\n')]#Find the total score of a student

#grade[student[2]] will lookup for the score that we initialized earlier

#if student has a grade as A then this will look up as grade['A'] which will return 4

#Find the total score as product of this grade and units for this course

continue

else:

if(total_units>0):#Check if score has been calculated for a student earlier

print("in")

GPA=total_score/total_units#Calculate the GPA

output_file.write("%-26s%.2f\n" % (student_name, GPA))#Write the GPA and Student Name in the required format

total_units=0#reset the units

total_score=0#reset the score

if(total_units>0):#Essential for the case when the file doesn't end with a new line(Check if total_units is not 0) which means a record is pending

#to be written to the file

GPA=total_score/total_units#Calculate the GPA

output_file.write("%-26s%.2f\n" % (student_name, GPA))#Write the GPA and Student Name in the required format

total_units=0#reset the units

total_score=0#reset the score

input_file.close()#Close the input file

output_file.close()#Close the output file

except IOError as e:

print("Problem in Opening the required file")#Print a message if file cannot be opened

Explanation:

The program has been tested for all 3 scenarios mentioned i.e.

a. If the file ends without \n

b. If the file ends with 2 \n

c. If the file ends with 1 \n

PS: The Program will run irrespective of how it ends. Even if there are many \n at the end of file, the program will be fine.

3 0
2 years ago
Other questions:
  • Software that manages and supports the resources of a computer is known as?
    10·1 answer
  • As a bank employee, you often work from home and remotely access a file server on the bank’s network to correct errors in financ
    8·1 answer
  • How do I get more points?
    13·2 answers
  • When you use the fill handle to copy a formula to adjacent cells, this creates what kind of cell reference?
    5·1 answer
  • Your IT manager wants you to set up three computers to appear to users as one powerful Windows Server 2016 server. What capabili
    14·1 answer
  • 17. When an industrial electrical circuit requires a 220 VAC single phase power supply, the electric power supply circuit is nor
    7·1 answer
  • How do I start conversations with ppl??? If u answer right I will try send u more points... So please help me
    7·1 answer
  • Explain in details how Galen , a physician during the Middle Ages, expanded on Hippocrates' theory of the four humors and explai
    6·1 answer
  • Which technology do online storesusually use to present customized content?
    10·1 answer
  • ____ the most popular word processing applications software<br><br>​
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!