• ¿Documento equivocado? Cámbialo gratis
  • Escrito por estudiantes que aprobaron
  • Inmediatamente disponible después del pago
  • Leer en línea o como PDF
Vender
¿Dónde estudias?
Tu idioma
Document preview thumbnail
Vista previa 2 fuera de 8 páginas
Examen

Cos1511

Document preview thumbnail
Vista previa 2 fuera de 8 páginas

The Cos1511 exam will test you on the basic structures within the C++ Programming Language , It covers the following fundamentals ; 1) Variables in C++ 2) Data Types in C++ (This includes strings for text,double for 2 decimal point numbers, float for 1 decimal point numbers, integer for whole numbers) 3) Arrays in C++ 4)Functions in C++ 5)input/output stream in C++ 6)Structs in C++ 7) Loops ( For, While , Do ...While Loops) in C++ 8)Conditions in C++ A brief overview of prescribed programming language in cos1511: C++ is a leading ,versatile , robust multiparadigm programming language encompassing mainly Object Oriented Programming,functional programming used for ...Guess ... The call of duty game you play was built in c++ (c++ is a leading game development language since it operates in low level compared to popular Python, Javascript languages which are much slower than C++) Operating Systems such as windows Web Browsers and many more So what you are waiting for buy now and recieve a sample code to get started in c ++ For more content Contact me on my email :

Vista previa del contenido

Jan/Feb 2023



70 Marks




This paper consists of 8 pages out of 70 marks


INSTRUCTIONS:

1. Answer all the questions on a Word document/by hand and convert to PDF.
2. Number your answers and label your rough work clearly.
4. Marks are awarded for part of an answer, so do whatever you are able to in each question.




ALL THE BEST




[TURN OVER]

, 2

Choose the correct option and write only the number

Question 1 [20]
1.What is the output of the following code fragment? (2)

int x = 0;
while( x < 8)
cout << x << " ";
x ++;
cout << x << endl;

1. 0
2. infinite loop
3. 1 2 3 4 5 6 7 8
4. 0 1 2 3 4 5 6 7 8

2.What is the value of x after the following statements? (2)

int x, y, z; y = 10;
z = 3;
x = y * z - 3;

1. 0
2. 3
3. 10
4. 27

3.What is the value of x after the following statements? (2)

int x;
x = x + 15;

1. 0
2. 14
3. 15
4. not defined

4.What is the output of the following code? (2)

cout << "Where is the \\" << endl;

1. Where is the \
2.Where is the
3.Nothing, it is a syntax error
4.Where is the \ endl

5.What is the value of xafter the following statements? (2)

int x;
x = 19 % 5;

1. 4.0
2. 4
3. 3.8
4. 8

6.Given the following code fragment and the input value of 5, what output is generated? (2)
[TURN OVER]
float tax; float total;

cout << "Enter the cost of the item\n"; cin >> total;

Información del documento

Subido en
26 de enero de 2023
Número de páginas
8
Escrito en
2022/2023
Tipo
Examen
Contiene
Preguntas y respuestas
$4.83

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

Seller avatar
shivamnaik
5.0
(1)
Vendido
7
Seguidores
2
Artículos
15
Última venta
1 semana hace



Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes