Geschreven door studenten die geslaagd zijn Direct beschikbaar na je betaling Online lezen of als PDF Verkeerd document? Gratis ruilen 4,6 TrustPilot
logo-home
Tentamen (uitwerkingen)

CPTS 121 FINAL EXAM QUESTIONS AND ANSWERS 2026

Beoordeling
-
Verkocht
-
Pagina's
18
Cijfer
A+
Geüpload op
19-02-2026
Geschreven in
2025/2026

CPTS 121 FINAL EXAM QUESTIONS AND ANSWERS 2026

Instelling
CPTS 121
Vak
CPTS 121

Voorbeeld van de inhoud

CPTS 121 FINAL EXAM LATEST
What happens when an array is passed to a function? - ANSWERS-The
address of the 0th element, only, is copied and passed into the function


How are arrays and pointers related? - ANSWERS-Arrays and pointers
are synonymous in terms of how they use to access memory. But, the
important difference between them is that, a pointer variable can take
different addresses as value whereas, in case of array it is fixed. In C ,
name of the array always points to the first element of an array.


Is array notation and pointer notation interchangeable? - ANSWERS-
Pointer notation may always be used with arrays; array notation may
replace pointer notation only if the pointer points to the start of an array


Declare and apply parallel arrays - ANSWERS-Parallel arrays may be
replaced by an array of structs, like votersfirst_name = ['Bones',
'Welma', 'Frank', 'Han', 'Jack'] last_name = ['Smith', 'Seger', 'Mathers',
'Solo', 'Jackles'] height = [169, 158, 201, 183, 172]


what is a string - ANSWERS-A character array which contains
alphabetic, numeric, and special characters, and is terminated by the null
character ('\0')




END OF
PAGE
1

, CPTS 121 FINAL EXAM LATEST
Declare and apply strings - ANSWERS-declare: char str_name[size];int
main(){// declare and initialize stringchar str[] = "Geeks";// print
stringprintf("%s",str);return 0;}


Declare and apply an array of strings - ANSWERS-An array of strings is
simply a 2-dimensional array of characters where each row represents a
string and the max length of each string is determined by the max
number of columnschar a[2][14]; strcpy(a[0], "blah"); strcpy(a[1],
"hmm");


functions <string.h>
strlen ( ) - ANSWERS-returns the length of a string, not including the
null character


functions <string.h>strcpy ( ) - ANSWERS-makes a fresh character-by-
character copy of a string


functions <string.h>strcat ( ) - ANSWERS-appends one string to the end
of another string


functions <string.h>strcmp ( ) - ANSWERS-performs a character-by-
character comparison based on ASCII values.returns 0 if the strings are

END OF
PAGE
2

, CPTS 121 FINAL EXAM LATEST
equal (case does matter), < 0 if string1 is less than string2, or > 0 if
string1 > string2


Declare and apply arrays of pointers - ANSWERS-char
*array_ptrs[10].const int MAX = 3; int main () { int var[] = {10, 100,
200}; int i, ptr[MAX]; for ( i = 0; i < MAX; i++) { ptr[i] = &var[i]; /
assign the address of integer. / } for ( i = 0; i < MAX; i++) {
printf("Value of var[%d] = %d\n", i, ptr[i] ); } return 0; }


Distinguish between scanf ( ) and gets ( ) related to strings -
ANSWERS-scanf() reads input until it encounters whitespace, newline
or End Of File(EOF) whereas gets() reads input until it encounters
newline or End Of File(EOF), gets() does not stop reading input when it
encounters whitespace instead it takes whitespace as a string.scanf can
read multiple values of different data types whereas gets() will only get
character string data.


what is a structure - ANSWERS-A collection of related fields or
variables under one name.May be used to describe real world objects


Declare and apply structs - ANSWERS-declare:
struct Books { char title[50]; char author[50]; char subject[100]; int
book_id; };

END OF
PAGE
3

Geschreven voor

Instelling
CPTS 121
Vak
CPTS 121

Documentinformatie

Geüpload op
19 februari 2026
Aantal pagina's
18
Geschreven in
2025/2026
Type
Tentamen (uitwerkingen)
Bevat
Vragen en antwoorden

Onderwerpen

$18.49
Krijg toegang tot het volledige document:

Verkeerd document? Gratis ruilen Binnen 14 dagen na aankoop en voor het downloaden kun je een ander document kiezen. Je kunt het bedrag gewoon opnieuw besteden.
Geschreven door studenten die geslaagd zijn
Direct beschikbaar na je betaling
Online lezen of als PDF


Ook beschikbaar in voordeelbundel

Maak kennis met de verkoper

Seller avatar
De reputatie van een verkoper is gebaseerd op het aantal documenten dat iemand tegen betaling verkocht heeft en de beoordelingen die voor die items ontvangen zijn. Er zijn drie niveau’s te onderscheiden: brons, zilver en goud. Hoe beter de reputatie, hoe meer de kwaliteit van zijn of haar werk te vertrouwen is.
Teacher101 Teachme2-tutor
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
472
Lid sinds
2 jaar
Aantal volgers
74
Documenten
10486
Laatst verkocht
15 uur geleden

Quality is my middle name.....100% ...my policy is to create and nurture people of quality by continuous education and training.....i guaranteed good grades 100% Feel free to get in touch through inbox...anything regarding help or issue with the exams posted... Finally after purchase please leave a good rating if satisfied with my work.... All the best as we continue working to improve ourselves through education

4.6

274 beoordelingen

5
222
4
15
3
26
2
3
1
8

Recent door jou bekeken

Waarom studenten kiezen voor Stuvia

Gemaakt door medestudenten, geverifieerd door reviews

Kwaliteit die je kunt vertrouwen: geschreven door studenten die slaagden en beoordeeld door anderen die dit document gebruikten.

Niet tevreden? Kies een ander document

Geen zorgen! Je kunt voor hetzelfde geld direct een ander document kiezen dat beter past bij wat je zoekt.

Betaal zoals je wilt, start meteen met leren

Geen abonnement, geen verplichtingen. Betaal zoals je gewend bent via iDeal of creditcard en download je PDF-document meteen.

Student with book image

“Gekocht, gedownload en geslaagd. Zo makkelijk kan het dus zijn.”

Alisha Student

Bezig met je bronvermelding?

Maak nauwkeurige citaten in APA, MLA en Harvard met onze gratis bronnengenerator.

Bezig met je bronvermelding?

Veelgestelde vragen