Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

COP3363 Final Exam (c++ side) 2025 Updated Guide A+, Exams of Advanced Computer Programming

COP3363 Final Exam (c++ side) 2025 Updated Guide A+

Typology: Exams

2024/2025

Available from 06/11/2025

Fortis-In-Re
Fortis-In-Re 🇺🇸

1

(1)

2.3K documents

1 / 6

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
COP3363 Final Exam (c++ side) 2025
Updated Guide A+
pf3
pf4
pf5

Partial preview of the text

Download COP3363 Final Exam (c++ side) 2025 Updated Guide A+ and more Exams Advanced Computer Programming in PDF only on Docsity!

COP3363 Final Exam (c++ side) 2025 Updated Guide A+

Formatted Text File - ANSWER--text is made out of readable characters -looks like something cout would print -no extra converting Binary File - ANSWER--unformatted data stored in raw formatt sequential access file structure - ANSWEF-records in files are organized and processed in numerical or sequential order, typically the order in which they were entered random access file structure - ANSWERrecords can be accessed in any order, regardless of their physical locations in storage media. This method of access is fast and very & asmall number of records need Lo be processed daily or weekly What classes arc cin and cout built. from - ANSWER -cin is type istrcam -cout is type ostream How do you declare file stream objects - ANSWER-output: ofstream outl; input: ifstream inl; How to attach files to stream objects - ANSWER-streamName.open(); What are the variations in opening a file? - ANSWER-by default, if you open an existing file, it will be overwritten How to append to a file?- ANSWER-streamname.open("Tile name", ios::app); Willa file sometimes not open?- ANSWEF-Yes, sometimes it wont -do this iff{name of stream) What do you do when you're done with a file? - ANSWER-streamname.close(); After you close a sircam, can it still be roused? - ANSWER-Ycs eofQ member function - ANSWERreturns a bool value on linux/mac type in ctrl-d to enter this char or on windows type ctrl-z putQ - ANSWER-can be used to print a character -returns type ostream -it can be cascaded get - ANSWER-does not skip white space -version with no parameters returns the ascil value chi = cin.get(Q); - ANSWER-no parameter version of get -no white spaces skipped -ofstream inherits all the features of ostream -ostream and istream are the parent functions What class should you use when passing parameters? - ANSWER--using parent types is more versatile, allows you to pass many different children What is a struct- ANSWER-a collection of data elements, encapsulated into one unit How much space do struct blueprints take up? - ANSWER-none How do you define a structure? - ANSWER-strnet structurcName shit } struct variables if you care to do so; How do you define structure variables? - ANSWER-structureName variableName; -declare arrays, ptrs, and different types Just like any other variable How does the syntax vary?- ANSWERif you only want structure variables, you do not need to give the struct a name -you can declare structs within structs How do you access data members of a struct? - ANSWEI-use the dot operator format: structvamame.datavamame; When do you use the arrow operator? - ANSWER-when using struct as a pointer --—Format: structpointer->varname; What do you have to do when declaring new structs? - ANSWER-when you declare on the initialization line, all the values must be in the order in which they were declared in What is another way to use struct pointers? - ANSWER-(*fptr).num = 10; Why are structs and pointers so weird? - ANS WEF-The dot operator has a higher precedence? How do you pass structs in and out of functions? - ANSWEF-use the structname as a parameter type -pass them by address or reference due to their size How do you declare a nested struct? - ANSWER-example: structName structvar("----", “ What are enumerations?- ANSWER-a way to create a new type with finite set of symbols as values What is the significance of values? - ANSWER-they are values, NOT strings What do enums default to for values - ANSWER-they start @ 0 and then increase How do you declare an enum? - ANSWEF-enum typename {list of values};