100% de satisfacción garantizada Inmediatamente disponible después del pago Tanto en línea como en PDF No estas atado a nada 4,6 TrustPilot
logo-home
Examen

Computer Engineering 2

Puntuación
-
Vendido
-
Páginas
24
Grado
A+
Subido en
16-03-2025
Escrito en
2024/2025

Computer Engineering 2

Institución
Computer Engineering
Grado
Computer engineering










Ups! No podemos cargar tu documento ahora. Inténtalo de nuevo o contacta con soporte.

Escuela, estudio y materia

Institución
Computer engineering
Grado
Computer engineering

Información del documento

Subido en
16 de marzo de 2025
Número de páginas
24
Escrito en
2024/2025
Tipo
Examen
Contiene
Preguntas y respuestas

Temas

Vista previa del contenido

1. The binary representation of the decimal number -6 in 8-bit two's complement is:

A. 11111010

B. 10000110

C. 11111001

D. 10000011

Answer: A) 11111010

Rationale: The two's complement of -6 in 8-bit binary is 11111010. First, write 6 in

binary (00000110), then invert the bits (11111001), and finally add 1 (11111010).




2. What is the largest number that can be represented by a 4-bit binary number?

A. 15

B. 16

C. 14

D. 17

Answer: A) 15

Rationale: A 4-bit binary number can represent values from 0000 (0 in decimal) to

1111 (15 in decimal). So, the largest value is 15.




3. What is the time complexity of bubble sort?

A. O(n)

,B. O(n^2)

C. O(log n)

D. O(n log n)

Answer: B) O(n^2)

Rationale: Bubble sort compares adjacent elements and swaps them if needed. This

process is repeated for each element, resulting in a time complexity of O(n^2).




4. Which data structure is best suited for implementing a priority queue?

A. Array

B. Stack

C. Heap

D. Queue

Answer: C) Heap

Rationale: A heap is an efficient data structure for implementing a priority queue

because it allows quick access to the highest (or lowest) priority element.




5. The worst-case time complexity of quicksort is:

A. O(n log n)

B. O(n^2)

C. O(n)

D. O(log n)

Answer: B) O(n^2)

, Rationale: In the worst case, when the pivot selection is poor, the quicksort algorithm

has a time complexity of O(n^2).




6. In binary arithmetic, what is the result of 1101 + 1011?

A. 11000

B. 11010

C. 10111

D. 10000

Answer: A) 11000

Rationale: The binary addition of 1101 and 1011 is as follows:

markdown

Copy

1101

+ 1011

-------

11000




7. The main function in C programming language is called:

A. void()

B. main()

C. start()

D. entry()
$10.99
Accede al documento completo:

100% de satisfacción garantizada
Inmediatamente disponible después del pago
Tanto en línea como en PDF
No estas atado a nada

Conoce al vendedor
Seller avatar
douglasmugwe82
5.0
(1)

Conoce al vendedor

Seller avatar
douglasmugwe82 Teachme2-tutor
Seguir Necesitas iniciar sesión para seguir a otros usuarios o asignaturas
Vendido
2
Miembro desde
1 año
Número de seguidores
0
Documentos
4239
Última venta
3 meses hace
fully answered questions and answer

fully answered questions and answer

5.0

1 reseñas

5
1
4
0
3
0
2
0
1
0

Recientemente visto por ti

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