Question 1
for(int i=0; i < n; i++)
{
for(int j=0; j < (2*i); j+=(i/2))
{
cout<<\"Hello Geeks\";
}
}
Question 2
Question 3
Question 4
!, ::, ->*, ~, .*, sizeof, new
Question 5
#include <stdio.h>
void print(int c){
if (c < 0) {
return;
}
printf(\"%d \", c);
c--;
print(c);
c++;
printf(\"%d \", c);
}
int main() {
int c = 5;
print(c);
return 0;
}
Question 6
Question 7
Question 9
while (true) // infinite condition { M :____; printf("%c", b); printf("%c", b); N:____; }Code B:
while (true) // infinite condition { O:____; printf("%c", a); printf("%c", a); P:____; }What should be the binary semaphore operation on M, N, O, P respectively and what must be the initial values of semaphore X, Y in order to get the output bbaabbaabbaa . . . ? Where P is down and V is up operation respectively.
There are 9 questions to complete.