Instructions: 1. Submission deadline6/1/20232. 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

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Instructions: 1. Submission deadline6/1/20232. 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: intn=10, m:m=2⋅(n+m)What is the values ofmandn? Answer: Q2) Determine the error and rewrite the correct code for the following function declaration; char Total(intx,y, intz) \{ ints=x+y+z; returns; 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 aC++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); inti; for(i=0,i<5;i++)intList[i]=2∗i+1for(i=0;i<5;i++)cout≪<intListat(i)≪"∗∗; cout≪<endl; Answer Q9) Suppose that you have the followingC++code: vectorsint> myList( 5): unsigned int length;myList[0]=3; for(inti=1;i<4;i++)myList[i]=22∗myList[i−1]−5; myList.push_back(46): myList.push_back(57); myList.push_back(35); a. Write aC++statement that outputs the first and the last elements of 

 

 

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Linux
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education