Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

QUESTION 1 What will be the output of following statements? char s[] = Learn C!!; printf ( %s, &s[1] ); A. L B. earn

QUESTION 1

  1. What will be the output of following statements?

    char s[] = "Learn C!!";

    printf ( " %s", &s[1] );

    A.

    L

    B.

    earn C!!

    C.

    Learn C!!

    D.

    e

2 points

QUESTION 2

  1. What will be the output of following Program code?

    void fun(int, int*);

    int main()

    {

    int i = -5, j = -2;

    fun (i, &j);

    printf("i = %d j = %d ", i, j);

    return 0;

    }

    void fun (int i, int *j)

    {

    i = i*i;

    *j = *j**j;

    }

    A.

    i = 25 j = 4

    B.

    i = -25 j = -4

    C.

    i = -5 j = 4

    D.

    i = -5 j = -2

2 points

QUESTION 3

  1. Which of the following is equivalent to ++*ptr , where ptr has been declared as:

    int *ptr;

    A.

    *ptr++

    B.

    *(ptr++)

    C.

    &ptr++

    D.

    (*ptr)++

2 points

QUESTION 4

  1. Any element of array declared as:

    int arr[3][4];

    can be accessed in pointer notation (where i represents row index and j represents column index) with generic formula as:

    A.

    *(*arr + i +j)

    B.

    **(arr + i) +j)

    C.

    *(*(arr + i) +j)

    D.

    (*(*(arr) + i) +j)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases And Information Systems 1 International Baltic Conference Dbandis 2020 Tallinn Estonia June 19 2020 Proceedings

Authors: Tarmo Robal ,Hele-Mai Haav ,Jaan Penjam ,Raimundas Matulevicius

1st Edition

303057671X, 978-3030576714

More Books

Students also viewed these Databases questions

Question

Discuss the challenges in scanning the environment.

Answered: 1 week ago

Question

Finding and scheduling appointments with new prospective clients.

Answered: 1 week ago