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)

CNIT 105 QUESTIONS AND ANSWERS

Beoordeling
-
Verkocht
-
Pagina's
5
Cijfer
A+
Geüpload op
24-01-2026
Geschreven in
2025/2026

CNIT 105 QUESTIONS AND ANSWERS

Instelling
Vak

Voorbeeld van de inhoud

CNIT 105 QUESTIONS AND ANSWERS


Which of the following is the standard way to print a character variable c; char c = 'C';

printf("%d", c);
printf("%c", c);
printf("%s", c);
printf("%c", &c); - Answers -printf("%c", c);

What is the extension of the source file of 'c' program?

.exe
.obj
.c
.cpp - Answers -.c

Which of the following is the standard way to scan a float variable x?
float x;

scanf("%f", &x);
scanf("%.2f", &x);
scanf("%d", &x);
scanf("%f", x); - Answers -scanf("%f", &x);

In a C program, the execution begins with which function?

main ( ) function
Doesn't matter
First function in the program
There is no function in c program - Answers -main ( ) function

When you don't want the function to return anything which of the following return type
will you use?

int
void
Nothing
float - Answers -void

Which of the following option is a prototype of the given function?
int divide(int a, int b) {

return a / b

, }

int divide (int, int);
int divide ( );
int divide (int a, int b);
void divide (int a, int b); - Answers -int divide (int, int);

Identify the problem in the following code
float compute (int a, int b) {
float answer;
answer = a / b;
}

Variable answer should be of type int
There is nothing wrong with this function
Function doesn't return anything
Output type of the function should be int - Answers -Function doesn't return anything

How many times will the loop in the following code run
int main ( ) {

int n = 1;
int sum = 0;

while ( n <= 10 ) {
sum = sum + n;

}

printf("Sum of numbers from 1 to 10 is: %d", sum);

}
The loop will run infinite times
The loop will run 11 times
The loop will run 10 times
The loop will not execute - Answers -The loop will run infinite times

What is the scope of a variable

It is a data type of the variable
It is the segment of the code where the variable can be used
It is a location of the variable in RAM
It is the same as name of the variable - Answers -It is the segment of the code where
the variable can be used

What will be the output of the following code

Geschreven voor

Vak

Documentinformatie

Geüpload op
24 januari 2026
Aantal pagina's
5
Geschreven in
2025/2026
Type
Tentamen (uitwerkingen)
Bevat
Vragen en antwoorden

Onderwerpen

$12.99
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

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.
GEEKA YALA UNIVERSITY
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
2107
Lid sinds
4 jaar
Aantal volgers
1446
Documenten
53920
Laatst verkocht
15 uur geleden

3.8

358 beoordelingen

5
177
4
61
3
48
2
17
1
55

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