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

Exam (elaborations) AMCAT Automata programming Questions And Answers

Puntuación
-
Vendido
-
Páginas
23
Grado
A+
Subido en
26-12-2021
Escrito en
2021/2022

Exam (elaborations) AMCAT Automata programming Questions And Answers 1) I have a problem to solve which takes as input a number n. The problem has a property that given the solution for (n-1), I can easily solve the problem for n. Which programming technique will I use to solve such a problem? a) Iteration b) Decision-making c) Object Oriented Programming d) Recursion Ans: d Recursion means calling again and again. Therefore problem n can be solved with the solution n-1, by repeatedly calling it. 2) The memory space needed by an algorithm has a fixed part independent of the problem instance solved and a variable part which changes according to the problem instance solved. In general, which of these two is of prime concern to an algorithm designer? a) Fixed part b) Variable Part c) Product of fixed part and variable part d) None of these Ans: b AMCAT Automata programming Questions And Answers AMCAT Automata Programming Questions And Answers Variable part, since it changes according to the problem instance solved. 3) Pankaj and Mythili were both asked to write the code to evaluate the following expression: a – b + c/(a-b) + (a-b)^2 Pankaj writes the following code statements (Code A): print (a-b) + c/(a-b) + (a-b)*(a-b) Mythili writes the following code statements (Code B): d = (a-b) print d + c/d + d*d If the time taken to load a value in a variable, for addition, multiplication or division between two operands is same, which of the following is true? a) Code A uses lesser memory and is slower than Code B b) Code A uses lesser memory and is faster than Code B c) Code A uses more memory and is faster than Code B d) Code A uses more memory and is slower than Code B Ans: a AMCAT Automata Programming Questions And Answers Code A uses lesser memory and it is slower than code B. Since code B uses another variable d it needs to have more memory than code A. But code B will execute faster. 4) A queue is implemented as a singly-linked-list for easy addition and deletion of elements. Each node has an element and a pointer to another node. Which node will point to empty/no location? a) Rear b) Front c) Both d) None Ans: a The new node will always be added at the rear end, so the new/empty location will be pointed by Rear end. 5) Q is an empty queue. The following operations are done on it: ADD 5 ADD 7 ADD 46 DELETE ADD 13 AMCAT Automata Programming Questions And Answers DELETE DELETE ADD 10 What will be the content of Q after these operations? Front is marked by (F) and Rear is marked by (R). a) 10(R) 13(F) b) 5(R) 10(F) c) 13(R) 10(F) d) 10(R) 5(F) Ans: a Queue follows FIFO principle, so performing the FIFO operation the Front will be pointing to 13 and Rear will be pointing to 10. 6) A is an empty stack. The following operations are done on it. PUSH(1) PUSH(2) POP AMCAT Automata Programming Questions An

Mostrar más Leer menos










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

Información del documento

Subido en
26 de diciembre de 2021
Número de páginas
23
Escrito en
2021/2022
Tipo
Examen
Contiene
Preguntas y respuestas

Temas

$8.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
Los indicadores de reputación están sujetos a la cantidad de artículos vendidos por una tarifa y las reseñas que ha recibido por esos documentos. Hay tres niveles: Bronce, Plata y Oro. Cuanto mayor reputación, más podrás confiar en la calidad del trabajo del vendedor.
EXAMBANK12 Harvard University
Ver perfil
Seguir Necesitas iniciar sesión para seguir a otros usuarios o asignaturas
Vendido
80
Miembro desde
4 año
Número de seguidores
73
Documentos
28
Última venta
3 meses hace

4.3

11 reseñas

5
6
4
3
3
1
2
1
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