Consider an integer array A[1:100], which is initialized with 0 on all 100 positions. The following code is executed on this array:
void main()
{
int i,j;
for(i =1; i=100;i++)
{
for(j = i; j=100;)
{
if (A[j] == 0)
A[j]= 1;
else
A[j] = 0;
j=j+i;
}
}
}
How many positions in array are holding value 1 after complete execution of the above program segment on array A?
QUESTION ON RECURSION
QUESTION ON TIME COMPLEXITY
QUESTIONS ON C PROGRAM OUTPUT
RECURSION
BITWISE OPERATOR
RIGHT SHIFT OPERATOR
STATIC KEYWORD
C PROGRAMMING OUTPUT
ALGORITHMS
time complexity
theta
BIG O
OMEGA
TIME AND SPACE COMPLEXITY
DOUBLE HASHING
QUADRATIC PROBING
linked list for gate
PYQ
LINEAR PROBING
COLLISION
HASHING
net
B.tech
university
placement preparation
doubly linked list
GATE 2021