Functions - Point Out Errors :: Discussion


1.Point out the error in the program?
A.Missing parenthesis in return statement
B.The function should be defined as int f(int a, int b)
C.Redeclaration of a
D.None of above
Answer:  Option  C
Explanation:

f(int a, int b) The variable a is declared in the function argument statement.

int a; Here again we are declaring the variable a. Hence it shows the error "Redeclaration of a"

Tutorial Link:
Published by:Michael Daani

Comments are not available

Post your comments here:

Optional

Date to Date Current Affairs 2022

PakMCQs.net

Quick Links

GAT Subject



   Computer Science    English Mcqs    Agriculture    

Engineering



   Computer Science    Civil Engineering    

Technical



   Networking    Electronics    Database    

Past Papers



   Model Papers    FPSC Papers