Time Left - 15:00 mins

GATE 2022: Data Structure and Programming Quiz-4

Attempt now to get your rank among 308 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
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____

  • 308 attempts
  • 1 upvote
  • 2 comments
Jul 25GATE & PSU CS

Posted by:

Priya UpadhyayPriya UpadhyayMember since Sep 2020
Priya Upadhyay
Share this quiz   |