Knowee
Questions
Features
Study Tools

Which one of the following declarations is correct?Select one:int long;char int;int length;float double;

Question

Which one of the following declarations is correct?Select one:int long;char int;int length;float double;

🧐 Not the exact question you are looking for?Go ask a question

Solution

The correct declaration is "int length;". This is because in this declaration, "int" is a valid data type in programming and "length" is a valid variable name. The other options are incorrect because they either use reserved keywords as variable names or they combine two different data types which is not allowed.

Similar Questions

Which of the following statements are valid?a. int i = new int(30);b. double d[] = new double[30];c. char[] r = new char(1..30);d. int i[] = (3, 4, 3, 2);e. float f[] = {2.3, 4.5, 6.6};f. char[] c = new char()

Normally, the float data type is half of the size of ___________.Select the correct optionReload Math Equations char int short double

Which of the following declaration is not supported by C language?String str;Both “String str;” and “float str = 3e2;”float str = 3e2;char *str;Clear my choice

Select the correct answerIf an expression contains double, int, float, long, then the whole expression will be promoted into which of these data types?Optionsintlongdoublefloat

Which is the correct format specifier for double type value in C?

1/3

Upgrade your grade with Knowee

Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.