Skip to main content

Featured

The STEM Revolution: From Classrooms to Code Camps

  In Nepal, the "STEM Revolution" represents a significant departure from memorization and a move toward experiential, hands-on science, technology, engineering, and math education. This approach recognizes that although traditional classrooms are fundamental, they frequently fail to provide students with the critical thinking and problem-solving abilities that the modern world requires.  It is motivated by a shared understanding that in order for Nepal's youth to prosper in the digital era, they must not only comprehend ideas but also learn how to use them creatively to address pressing issues. Making education relevant and enabling students to be creators of technology rather than merely consumers are the goals of this revolution. Dynamic, unofficial learning settings like maker spaces, robotics clubs, and programming camps are at the core of this movement. These programs, which are frequently run by neighborhood tech companies and non-profits, act as dynamic centers...

Elements of C: Variables , Constants, Operators

 Variables

Variable is a name of  storage location in the memory that contains data and can be modified during program execution. We can understand like this , while declaring variable we are keeping space for some value. Each variable in C language should be unique. Before using any variable we must declare it before.

Rules for naming variable

i. Starting character must be any letter or underscore ( _ ) and ends with letter or digit.
ii. Variable name must be unique.
iii. keywords of C should not be used as variable.
iv. Variable name can be both uppercase and lowercase.
v . No other special characters can be used except letters, digits and underscore.

Declaring a variable

int x;
int a, b, c, d;

Constants

Constants are those value which remains same in the program and never change during executing of program. Types of constant in C language are integer constants, character constants, real constants and string constants.

Ex:
int num = 100;
char a = 'a';
float ab = 90.0342;
char name = "Hello";

Operators

Operators are special symbols which have special meaning in the program. They can operates mathematical and logical operation. Types of operators in C language:

Arithmetic operator: +, -, *, /, %
Compound assignment operators: =, -=, +=, *=, /=, %=
Relational operator: ==, < , > <=, >=, !=
Logical operator : && (and), || (or), !(not)
Unary operator: ++, --
Ternary operator: ?, : (Ex: h = (a< b)?a:b)
 

Comments

Popular Posts