Declarations and Initializations

Q1: Which of the declaration is correct?

A int length;

B char int;

C int long;

D float double;

ANS:A - int length;

int length; denotes that variable length is int(integer) data type. char int; here int is a keyword cannot be used a variable name. int long; here long is a keyword cannot be used a variable name. float double; here double is a keyword cannot be used a variable name. So, the answer is int length;(Option A).



img not found
img

For help Students Orientation
Mcqs Questions

One stop destination for examination, preparation, recruitment, and more. Specially designed online test to solve all your preparation worries. Go wherever you want to and practice whenever you want, using the online test platform.