Time Left - 15:00 mins
GATE 2024 Programming & Data Structures Rank Booster Quiz 25
Attempt now to get your rank among 55 students!
Question 1
What will be the input of the following code ?
Question 2
The ‘i' value printed by below program is _________
Question 3
Consider the code :
void fun(int i, int j)
{
while (i <=j && printf(“GATE”))
{
i = i + 2;
j = j – 2;
}
}
The number of times ‘GATE’ is printed when the fun(0, 40) is called will be _____.
Question 4
Consider the following C - fragment:
#include<stdio.h>
int main()
{
static int i;
for(++i; ++i; ++i)
{
printf("%d",i);
if(i==4) break;
}
return 0;
}
Which of the following option is correct for the above program?
Question 5
Consider the following C code:
Struct check
{
int i;
char *c;
} str [] = { 0, “improve”, 1, “better’, 2, “Digital”, 3, “ Better”}
main()
{
struct check *ptr = str;
ptr += 1;
ptr ++Ã c;
printf( “%d”, printf( “%s”, ptrà c));
}
What is the output for the following code?
Struct check
{
int i;
char *c;
} str [] = { 0, “improve”, 1, “better’, 2, “Digital”, 3, “ Better”}
main()
{
struct check *ptr = str;
ptr += 1;
ptr ++Ã c;
printf( “%d”, printf( “%s”, ptrà c));
}
What is the output for the following code?
Question 6
#include <stdio.h>
int f(char *p)
{
return (printf("%s\n",p));
}
void main(){
char str[20];
printf("Enter a string ");
scanf("%s",str);
printf("result = %d",f(str));
}
If entered string is “coding is good job”, what will be result ,result=?
int f(char *p)
{
return (printf("%s\n",p));
}
void main(){
char str[20];
printf("Enter a string ");
scanf("%s",str);
printf("result = %d",f(str));
}
If entered string is “coding is good job”, what will be result ,result=?
Question 7
The output of the above program is ________ .
- 55 attempts
- 0 upvotes
- 0 comments
Dec 8GATE & PSU CS