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();
}
1 Explain listing process with suitable example & Diagram
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).
www.assignmentsclub.com
Type your answer here...
example in C: const int a [] = {10, 20, 40, 80};
EXplain the order and unorder lists with suitable 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.
An example is: " I declare from this day forth that the 31st of October to be Hallowe'en
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.
The president will declare a state of emergency in response to the natural disaster.
A constant variable, also known as a constant, is a value that remains unchanged throughout a program or within a specific context. For example, in a mathematical formula for calculating the area of a circle, the constant π (pi) is approximately 3.14 and does not change regardless of the circle's size. In programming, a constant variable could be defined as const int MAX_USERS = 100;, where MAX_USERS will always equal 100 during the execution of the program.
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.