answersLogoWhite

0

Declaring a Constant:

We can declare a constant using the keyword "const".

E.g. const abc='a';const number=10;

const number[10]={1,2,3,4,5,6,7,8,9,10};

const name[7]={'K','U','N','D','A','N'};

#include<stdio.h>

#include<conio.h>

void main()

{

int i;

const name[7]={'K','U','N','D','A','N'};

for(i=0;i<7;i++)

{

printf("%c",name[i]);

getch();

}

User Avatar

Wiki User

12y ago

What else can I help you with?

Related Questions

Explain listing process with suitable example and Diagram?

1 Explain listing process with suitable example &amp; Diagram


Explain with suitable example how switch statement is differ from if statement?

www.assignmentsclub.com


What do you mean by recursive function explain with suitable example?

Type your answer here...


What is constant explain their storage representation with suitable example?

A constant is a variable that is immutable. The storage representation is exactly the same as for any other variable of the same type, the only difference is that all constants are allocated in the program's data segment (static memory).


How do you declare and initialize constant arrays?

example in C: const int a [] = {10, 20, 40, 80};


Need of project for mca students?

EXplain the order and unorder lists with suitable example


Can an object be accelerated if it is moving with constant speed If yes explain giving examples.?

Yes, it can. Perhaps the simplest example is when an object moves at constant speed, in a circle. In this case, the speed doesn't change; the velocity does.


How to put declare into a sentence?

An example is: " I declare from this day forth that the 31st of October to be Hallowe'en


Can an object be accelerated if it is moving with constant speed if yes explain giving example?

Yes, it can. Perhaps the simplest example is when an object moves at constant speed, in a circle. In this case, the speed doesn't change; the velocity does.


What is an example of a sentence with the word declare?

The president will declare a state of emergency in response to the natural disaster.


What is circular motion Explain with example?

Circular motion is when an object moves in a circular path around a central point. This motion involves a constant change in direction, but the speed remains constant. An example of circular motion is a planet revolving around the Sun or a car going around a roundabout.


Can an experiment that has sveral variables be used to explain a theory?

Yes. A good example of which is the Ideal Gas Law. PV=nRT You have four variables and one constant.