Typical Agile workflow:
Planning
Design
Development
Testing
Release
Thus order:
(E) → (A) → (D) → (C) → (B)
Initial:
arr = {1,2,3,4,5}
p → arr[0]
First statement:
*p++
Post-increment
Value printed = *p = 1
Then pointer moves to next element.
Now:
p → arr[1]
Second statement:
*(p+1)
p+1 → arr[2]
Value = 3
Output:
1 3
Which of the following properties correctly describe a Regular Grammar ?
(A) All productions rules are of the form $A \rightarrow xB$ or $A \rightarrow x$, where $A$ and $B$ are non terminal symbols and $x$ is a terminal symbol.
(B) Regular grammars are more powerful than context-free grammars and can express any type of language.
(C) There is a direct correspondence between regular grammar and finite automata.
(D) Regular grammars can generate languages that are not recognised by any type of automata.
Choose the correct answer from the options given below :
(A) True
Regular grammar productions follow
$A \rightarrow aB$ or $A \rightarrow a$
(B) False
Regular grammar less powerful than CFG
(C) True
Regular grammar ↔ Finite automata equivalence
(D) False
Regular languages are recognized by finite automata
Consider the function in C code :
Cal(a, b)
{
if (b != 1)
{
if (a != 1)
{
printf("*");
Cal(a/2, b);
}
}
else
{
b = b - 1;
Cal(10, b);
}
}
How many times * is going to be printed, if the function is called with
Cal(10, 10) ?
Observe recursion:
Each call prints * while dividing a by 2.
Sequence:
10 → 5 → 2 → 1
For each b value, stars printed = 3.
b decreases from 10 to 1.
Thus:
$9 \times 3 = 27$
Total stars printed = 27.
What is the output of code given below :
#include<iostream.h>
using namespace std;
class Base {
public:
Base(){
cout<<"Base Const";
}
virtual ~Base(){
cout<<"Base dest";
}
};
class derived : public Base {
public:
Derived(){
cout<<"Derived Const";
}
~Derived(){
cout<<"Derived dest";
}
};
int main()
{
Base *b = new Derived();
delete b;
return 0;
}
Step-1: Object creation
Base *b = new Derived();
Constructor order in inheritance:
Base constructor
Derived constructor
Output:
Base Const
Derived Const
Step-2: Deleting object
Base destructor is virtual, so destructors call in reverse order:
Derived destructor
Base destructor
Output:
Derived dest
Base dest
Final Output:
Base Const Derived Const Derived dest Base dest
If a software project has 2000 lines of code (LOC) and the average productivity rate is 10 LOC per person-hour, how many person-hours are required to complete the project?
Consider the following if $p$ and $q$ are two statements.
(A) $\sim (p \land q) = \sim p \lor \sim q$
(B) $\sim (p \lor q) = \sim p \land \sim q$
(C) $p \land \sim p = T$
(D) $\sim (p \Rightarrow q) = p \land \sim q$
(E) $p \lor q = \sim p \lor \sim q$
Choose the correct answer from the options given below :
Which of the following are context free language ?
(A) ${w^i x^j y^k z^l \mid i + k = j + l,; i,j,k,l \ge 0}$
(B) ${w^i x^j y^k z^l \mid i = j \text{ and } k = l,; i,j,k,l \ge 0}$
(C) ${w^i x^j y^k z^l \mid i = j = k \text{ and } k \ne l,; i,j,k,l \ge 0}$
(D) ${w^i x^j y^k z^l \mid i = j = k + l,; i,j,k,l \ge 0}$
(E) ${w^i x^j y^k z^l \mid i = j \text{ and } k \ne l,; i,j,k,l \ge 0}$
Choose the correct answer from the options given below :
Out of following steps in the proper sequence for simplifying a Boolean function using a Karnaugh map (K-map).
(A) Identify and group the largest possible cluster of $1$'s
(B) Draw the K-map for the given Boolean function
(C) Write the simplified Boolean expression from the grouped clusters
(D) Transfer the truth table values to the K-map
Choose the correct answer from the options given below :
A multi processor system with 16 processors is used to execute a parallelizable task. If the serial portion of the task takes 200 clock cycles and the parallel portion takes 800 clock cycles. When all 16 processors are used how many total clock cycles are required to complete the task?
Online Test Series, Information About Examination,
Syllabus, Notification
and More.
Online Test Series, Information About Examination,
Syllabus, Notification
and More.