Which is the right way to declare constant in C?Question 33Select one:A.int constant var =10;B.int const var = 10;C.const int var = 10;D.B & C Both

Question

Which is the right way to declare constant in C?Question 33Select one:A.int constant var =10;B.int const var = 10;C.const int var = 10;D.B & C Both
🧐 Not the exact question you are looking for?Go ask a question

Solution 1

The correct way to declare a constant in C is option C: const int var = 10;

Here's the step by step explanation:

  1. In C, the keyword 'const' is used to declare a constant.

  2. The type of the constant is specified after the 'const' keyword. In this case, it's 'int' which stands for integer.

  3. Knowee AI StudyGPT is a powerful AI-powered study tool designed to help you to solve study prob

Knowee AI StudyGPT is a powerful AI-powered study tool designed to help you to solve study problem.
Knowee AI StudyGPT is a powerful AI-powered study tool designed to help you to solve study problem.
Knowee AI StudyGPT is a powerful AI-powered study tool designed to help you to solve study problem.
Knowee AI StudyGPT is a powerful AI-powered study tool designed to help you to solv

This problem has been solved

Similar Questions

Which is the right way to declare constant in C?Question 33Select one:A.int constant var =10;B.int const var = 10;C.const int var = 10;D.B & C Both

ect the correct answerHow do you declare a constant pointer to an integer in C?Optionsint *const ptr;const int *const ptr;const int *ptr;int const *const ptr;

rrect answerWhich of the following is a valid way to initialize a constant in C?Optionsconst int x = 5;constant x = 5;int const x = 5;int x = const 5;

Which of the following is not a valid way to declare a JavaScript variable?Optionsvariable x;let x;var x;const x;

How do you declare an array of integers in C?*1 pointint arr[10];array int[10];[10]int array;int array 10;

1/3