0% found this document useful (0 votes)
64 views4 pages

CS214: Programming Fundamentals: Sections: A, B, C

1. The document is an assignment cover page for CS214 Programming Fundamentals at National University of Computer & Emerging Sciences. 2. It provides instructions for Assignment 1 such as the due date, submission guidelines, and important notes about plagiarism. 3. The assignment contains 9 questions related to computer memory representation, data types, file I/O, and an exercise to write a C++ program that filters words from an input file.

Uploaded by

Muhammad Montaha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
64 views4 pages

CS214: Programming Fundamentals: Sections: A, B, C

1. The document is an assignment cover page for CS214 Programming Fundamentals at National University of Computer & Emerging Sciences. 2. It provides instructions for Assignment 1 such as the due date, submission guidelines, and important notes about plagiarism. 3. The assignment contains 9 questions related to computer memory representation, data types, file I/O, and an exercise to write a C++ program that filters words from an input file.

Uploaded by

Muhammad Montaha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

National University of Computer & Emerging Sciences

CS214: Programming Fundamentals A#1


Sections: A, B, C
Instructor: Azhar Rauf
Issue date: TA: Talha Anis (i150533) Due date:

Friday Thursday
For queries, contact:
Jan 20th 0335 5703007 Jan 26th
[email protected]

Assignment
Solo Group Quizbased
Type

Submission
Online Inclass Either
Type
Submission 1. Attach this cover
Guidelines page.
1. Submit .cpp, .jpeg in Follow guidelines
2. Only use A4size
(Read under the designated for the submission
blank white paper
Submission SLATE folder in type checked.
(70g).
Type Assignments tab.
3. Staple all pages.
Column)
4. Due at class start.

Name: _____________________________ Roll No: ________________

Signature: _________________________ Section: ________________


ImportantNotes: ForTAuseonly:

1. ZERO Tolerance Policy for plagiarism and CheckedbyTA


cheating. Plagiarism YesNo
2. Violatorsmay receive F in the course and/or will be %Attempted
reported to the Department Discipline Committee. TotalMarks
3. No retake or allocation of average marks for MarksObtained
assignments in any case, irrespective of the reason,
genuine or otherwise.

NUCES-FAST: Spring17: PF (EE) Assign # 01 Page 1/4


Slight plagiarism can lead you to F. Better not to submit assignment instead of copying.

Q1.Completethecomputerandprogrammersmodelsgivenbelow.Togetmaxcreditshowall
yourworking(directanswerswillnotbeconsidered).

ComputerView ProgrammerView
Address(DEC) Value(HEX) Type Value(DEC)
.
.
.
182424 00
182425 00
Integer
182426 06
182427 06
182428 42 Character
182429
182430
182431
182432
Double 8421.1248
182433
182434
182435
182436
182437 01
182438 93
Float
182439 E8
182440 6B
182441 01
182442 93
Integer
182443 E8
182444 6B
182445 CD
Short
182446 AB
182447
182448
Integer 101325
182449
182450
.
.

.

NUCES-FAST: Spring17: PF (EE) Assign # 01 Page 2/4


Q2.InQ1above,whatistheminimumwidthoftheaddressbus(inbits)ifthelargestmemory
addressis0x4970?

Q3.Whatistherangeofsignedvaluesthatcanberepresentedina32bitdatabus?Express
youranswerindecimal.

Q4.HowmanyKbarethereinamemoryof4MBsize?

Q5.Outofthefollowingdecimalvaluesdetermineiftheycanbefitinmemoryornot?

Ifnotthenspecifythereasonwhy.
IfyesthenwritetheHEXvalue.

Type Value(DEC) Value(HEX)


Integer 1.123x10^7
Float 5.877x10^39
Character 256
Double 1.8167x10^13
Integer 1561013265

Q6.Highlightdifferencesbetweencharacterarrays,CstringsandC++Strings.

Q7.Researchontheinternetto:

a) Brieflyexplaininaparagraphofabout100wordswhatobjectorientedprogrammingis.
b) MentiononefeatureofCthatisnotpartofC++andviceversa.

Q8.Whenusingfileinput,whyareEOFcontrolledloopsusedinsteadofsentinelcontrolled
loops?

NUCES-FAST: Spring17: PF (EE) Assign # 01 Page 3/4


Q9.Assumingthatatextfilenamedinput.txtcontainssometextwrittenintoit,writeaC++
program,thatreadstheinputfileandcreatesanewfilenamedresult.txt,tocontainonly
thosewordsfromtheinputfilewhichstartwithalowercasevowel(i.e.,with'a','e','i','o','u').
Sampleinputandoutputfilesaregivenasshown:

:-

End of Assignment No. 1

NUCES-FAST: Spring17: PF (EE) Assign # 01 Page 4/4

You might also like