Search This Blog

Showing posts with label c programming. Show all posts
Showing posts with label c programming. Show all posts

Program to PRINT ALL EVEN NUMBER UNDER 100 in C Language

 PRINT ALL EVEN NUMBER UNDER 100

Hey people of Code Junction,Welcome Back to this blog so lets print all even numbers till 100.
Its an easy program.


Write a C program to print all even numbers from 1 to n using for loop. C program to generate all even numbers between given range. Logic to print even numbers using if else and for loop in given range in C programming.
Lets dive into it right now !!

CODE

#include<stdio.h>
int main()
{
int i;                                      //Variable Declaration

for(i=2;i<=100;i=i+2)         //loop starts with 2 till 100,and after 1 loop i will starts with addition of 2
{                                               
printf("\n %d",i);
}
return 0;
}


How to Create Any Multiplication Table Using C Language

 MULTIPLICATION TABLE IN C Programming

Hey guys,Welcome back !!

So in this tutorial let us learn how to create any multiplication table using c programming Language.
Creating Table is really Fun. And Personally i really enjoy creating table.

C Program to Generate Multiplication Table Example to generate the multiplication table of a number (entered by the user) using for loop. To understand this example, you should have the knowledge of following C programming topics:

CODE

#include<stdio.h>
int main()
{

int number,i;

printf("ENTER NUMBER");
scanf("%d",&number);


for(i=1;i<=10;i++)
{

printf("%d",number*i);

}

return 0;
}

OUTPUT




How To Print Your Name N Number Times in C Programming

Code for "PRINT YOUR NAME N NUMBER OF TIMES" Program in C language

Hey guys welcome back, hope you are enjoying other blogs,so in this Tutorial i am explaining how
to to print Your name For N number of times,where n means the size you will give at the starting.


C program to print a string: it can be printed by using various functions such as printf, puts. A string ends with '\0', it is a character used to mark end of a string. See the following code:

For example if you give your size as 5,then it will print your Name 5 Times.

CODE
#include<stdio.h>                    //header file
void main()
{
int n,i;                                      //variable declaration
printf(" \n HOW MANY TIMES TO PRINT ");
scanf(" %d ", &n);

for(i=0;i<n;i++)                      //For Loop For the size of n 
{
    printf("\n ENTER YOUR NAME");
}
}

OUTPUT

Hello World Programm in C | Code Junction

HELLO WORLD IN C LANGUAGE 


A simple C program to display "Hello, World!" on the screen. Since, it's a very simple program, it is often used to illustrate the syntax of a programming language.

At first, lets start with learning with what is C ??


C  is a general-purpose, imperative computer programming language, supporting structured programming, lexical variable scope and recursion, while a static type system prevents many unintended operations. By design, C provides constructs that map efficiently to typical machine instructions, and it has therefore found lasting use in applications that were previously coded in assembly language. Such applications include operating systems, as well as various application software for computers ranging from supercomputers to embedded systems. 

C was originally developed at Bell Labs by Dennis Ritchie, between 1972 and 1973. It was created to make utilities running on Unix. Later, it was applied to re-implementing the kernel of the Unix operating system[6]. During the 1980s, C gradually gained popularity. Nowadays, it is one of the most widely used programming languages, with C compilers from various vendors available for the majority of existing computer architectures and operating systems. C has been standardized by the American National Standards Institute (ANSI) since 1989 (see ANSI C) and subsequently by the International Organization for Standardization (ISO). 

C is an imperative procedural language. It was designed to be compiled using a relatively straightforward compiler, to provide low-level access to memory, to provide language constructs that map efficiently to machine instructions, and to require minimal runtime support. Despite its low-level capabilities, the language was designed to encourage cross-platform programming. A standards-compliant C program that is written with portability in mind can be compiled for a wide variety of computer platforms and operating systems with few changes to its source code; the language has become available on various platforms, from embedded microcontrollers to supercomputers. 

Code to print HELLO WORLD !!

#include<stdio.h>
void main()
{
    printf("HELLO WORLD");
}



tags:hello world in c programming
hello world c program example

Download CEHv9 Study Guide PDF || Certified Ethical Hacker V9 Book

Download CEHv9 Study Guide PDF This book will be a great journey for our users in the field of cyber security . This book contains in ...