## Search This Blog

Showing posts with label learn c language. Show all posts
Showing posts with label learn c language. Show all posts

## Program to Create Fibonacci series in Language C

WELCOME BACK TO CODEJUNCTION.IN , good to see you again on our blog , Make sure to check out our other blogs too.

In this program the user needs to enter the number then the program will produce Fibonacci series to that number.

What is Fibonacci Series in C Language ?
Fibonacci series in C programming: C program for Fibonacci series using a loop and recursion. Using the code below you can print as many terms of the series as required. Numbers of this sequence are known as Fibonacci numbers. The first few numbers of the series are 0, 1, 1, 2, 3, 5, 8, ...,. Except for the first two terms of the sequence, every other term is the sum of the previous two terms, for example, 8 = 3 + 5 (addition of 3 and 5).

### CODE

int main()
{
int count,first= 0, second= 1, next, i;

printf("Enter the number of terms:\n");
scanf("%d",&count);                                            //takes value from you

printf("First %d terms of Fibonacci:\n",count);
for ( i = 0 ; i < count ; i++ )
{
if ( i <= 1 )
next= i;
else
{
next= first+second;
first= second;
second= next;
}
printf("%d \n",next);
}

return 0;
}

## Program to Ask The User for Empid, Age, Salary and Display

Hey Coders, Welcome Back.
So this tutorial will help You to Create a program to Take input From users.
And Then Print it Same on the screen.

C program to ask the user details like empid,age,salary and display the same.Program to take input from users and display it.

CODE

#include<stdio.h>

int main()
{
int id,age,salary;

printf("\n ENTER EMPID");
scanf("%d",&id);

printf("\n ENTER AGE");
scanf("%d",&age);

printf("\n ENTER SALARY");
scanf("%d",&salary);

printf("%d",id);
printf("%d",age);
printf("%d",salary);
return 0;
}

OUTPUT

Hope you guys learn something watch other blogs too.

## 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

## 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 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 ...