loops in C

C series for 1st sem students: Conditionals and loops

Posted on 1 CommentPosted in Blogs, Technology

Today we are going to discuss about conditionals and loops in programming in general and the syntax of them in C. Conditional statements are those which check the validity of a statement, by implementing logical operations in the CPU and returns a true or false(1 or 0). In C language we do not have the boolean datatype or the values ‘true’ and ‘false’. Here 1 represents true and 0 false. In the hardware, a certain bit in a register (also called flag) is set or unset (a 1 or 0) after the logical operation is performed. This bit is then checked, and depending upon its value the subsequent lines of code are executed.

digital clock in C

C series for 1st sem students: Lets code a digital clock in C

Posted on Posted in Blogs, Technology

We will code a digital clock in C. Learning a programming language is useless if you can’t make cool applications with it. Building such things are way easier in modern languages like C#, java or javascript. But with a good understanding of the basic programming concepts, and using some library functions provided in various header files, we can make some really cool apps.

variable in C

C series for 1st sem students: variable, datatypes and macros

Posted on Posted in Blogs, Technology

Variable is a container to hold data. Datatype of a variable defines the type of data to be stored and the space required to store it. Variables in programming are analogous to variables in algebra. Just as algebraic expressions can have constant terms like ax + by = c , C programs can have constants, defined similar to variables but with the const keyword.

C series for 1st sem students: main()

Posted on 1 CommentPosted in Blogs, Technology

Lets now discuss about the ‘function’ part in main() function. As the semester has just started, you may not have been introduced to the concept of functions in programming. In layman terms, a function is a block of code which performs a certain operation. This concept of grouping specific codes to perform some task dates back to early days of development of programming.