Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I want to answer questions from 1 to 10 Instructions: 1. Submission deadline 6/1/2023 2. If you copy from others zero will be given. 3.

I want to answer questions from 1 to 10
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
Instructions: 1. Submission deadline 6/1/2023 2. If you copy from others zero will be given. 3. Assignment should be written with neat handwriting on proper A4 papers. 4. Upload the handwritten assignment in the blackboard, and submit the written Assignment physically. Q1) Consider the following code: int n=10,m : m=2(n+m) What is the values of m and n ? Answer: Q2) Determine the error and rewrite the correct code for the following function declaration; char Total(int x,y, int z ) \{ int s=x+y+z; return s; Answer: Q3) Exercise: Write a function that take your name and print a message say: Welcome, your name. Answer: Q4) Consider the following statements: struct studentName string first; string last; i; int main0 studentName st1, st2; Mark the following statements as valid or invalid. If a statement is invalid, explain why. a. st1.first = "William"; b. st 1.last = "Smith"; c. cin >st2; d. coutC++ code to store the first component of products as follows: partName :printer, price : 150 c. Write a C++ code to output the name of first part. Q5) To use a vector object in a program, which header file must be included in the program? Answer: Q6) What do the following statements do? u. vector aint > list (50); b. vector namelist; Q7) Consider the following code: vectors] ={ "Majmaah", "University", "Programming" }; Q8) What is the output of the following C++ code? vector im> intList(5); int i; for (i=0,i myList( 5) : unsigned int length; myList[0]=3; for ( int i=1;i

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database And Expert Systems Applications 31st International Conference Dexa 2020 Bratislava Slovakia September 14 17 2020 Proceedings Part 1 Lncs 12391

Authors: Sven Hartmann ,Josef Kung ,Gabriele Kotsis ,A Min Tjoa ,Ismail Khalil

1st Edition

303059002X, 978-3030590024

More Books

Students also viewed these Databases questions