Recent questions tagged goclasses-cs-dpp-day-56

9 9 votes
2 2 answers
1.2k
1.2k views
#include <stdio.h struct Point { int x, y; }; int main() { struct Point p1 = {10, 20}; struct Point *ptr = &p1; ptr->x += 5; (*ptr).y -= 10; printf("%d %d\n", p1.x, p1.y)...
8 8 votes
6 6 answers
982
982 views
#include <stdio.h void fun() { static int count = 0; count++; printf("%d ", count); } int main() { for (int i = 0; i < 3; i++) fun(); return 0; }What is the output of the...
9 9 votes
2 2 answers
647
647 views
Consider the following psuedocode fragment, where $y$ is an integer that has been initialized.int i=1 int j=1 while (i<10): j=j*i i=i+1 if (i==y): break end if end whileC...
5 5 votes
3 3 answers
680
680 views
Given the pseudocode below for the function remains(), which of the following statements is true about the output, if we pass it a positive integer $n>2$ ? int remains(in...
4 4 votes
1 1 answer
632
632 views
Which of the following expressions is NOT equivalent to ${ }^*(\operatorname{arr}+3)$ where arr is an integer array?$\operatorname{arr}[3]$ *(&arr $[0]+3)$ $* a r r+3$ $*...
To see more, click for the full list of questions or popular tags.