Time Left - 15:00 mins

GATE 2024: Data Structure and Programming Quiz-4

Attempt now to get your rank among 362 students!

Question 1

Consider the following function:

What is the functionality of the above function find( ) when the string is passed into the function ?

Question 2

Consider the following program fragment

Char *person[] = {“RAM”, “SHYAM”, “RAHIMA”}

Printf(“%c”, *(person+1)+2);

What will be the output of above program fragment,

Question 3

Which of the following is correct output for the program code given below?
main( )
{
 void pr( );
 pr ( );
 pr ( );
 pr ( );

void pr ( )
   {
     static int i = 1;
     printf (“%c”, (65+ i ++));
   }

}

Question 4

C program to demonstrate explicit type casting
#include<stdio.h>
int main()
{
               double x = 1.2;              
               int sum = (int)x + 1;              
               printf("sum = %d", sum);         
              return 0;

}

Question 5

What is the output of the following program-

main ()

{

int a = 324

char * b = (char *) & a.

b + +;

* b = 2

printf(n % d”, a);

Question 6

Consider the following function :

The number of values printed by foo (5) is____

  • 362 attempts
  • 1 upvote
  • 2 comments
Mar 13GATE & PSU CS