Use app×
Join Bloom Tuition
One on One Online Tuition
JEE MAIN 2025 Foundation Course
NEET 2025 Foundation Course
CLASS 12 FOUNDATION COURSE
CLASS 10 FOUNDATION COURSE
CLASS 9 FOUNDATION COURSE
CLASS 8 FOUNDATION COURSE
0 votes
46 views
in Computer by (67.7k points)
closed by

Consider the following C program.

void f(int, short);

void main()

{

int i = 100;

short s = 12;

short *p = &s;

______; // call to f()

}

Which one of the following expressions, when placed in the blank above, will NOT result in a type checking error?

(A) f(s,*s)

(B) i = f(i,s)

(C) f(i,*s)

(D) f(i,*p)

1 Answer

+1 vote
by (68.9k points)
selected by
 
Best answer

Correct option is (D) f(i,*p)

Here function f takes two arguments one is int and the other is short and its return type is void. So, in main function ‘P’ is a pointer to short and when we call f (i,*p) there won’t be any type checking error.

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

Categories

...