Program to print Fibonacci Series using Recursion

fibonacci-sequence

Program to print Fibonacci Series using Recursion A Fibonacci series is defined as a series in which each number is the sum of the previous two numbers with 1, 1 being the first two elements of the series. #include<stdio.h> // declaring the function void printFibo(int ); int main() { printf(“\n\n\t\tEduguru – Recursion program in c\n\n\n”); … Read more

Program to find Factorial of a Number using Recursion

Program to find Factorial of a Number using Recursion

Program to find Factorial of a Number using Recursion #include<stdio.h> // declaring the function int fact(int); int main() { printf(“\n\n\t\tEduguru – Recursion Program Example\n\n\n”); int num, f; printf(“\n\nEnter a number: “); scanf(“%d”, &num); f= fact(num); printf(“\n\nFactorial of %d is %d\n\n”, num, f); printf(“\n\n\t\t\tCoding is Fun here !\n\n\n”); return 0; } int fact(int aj) { if(aj==1 … Read more

C Program for Adding Two Numbers Using Recursion

c program to add 2 numbers

C Program for Adding Two Numbers Using Recursion #include<stdio.h> int y; /* Function to add two numbers and return the result */ int add(int m, int n) { if(n == 0) return m; /* Recursion: adding 1, n times and then at the end adding m to it */ y = add(m, n-1) + 1; … Read more

C Program find whether a Number is Prime Or Composite using Recursion

prime number

C Program find whether a Number is Prime Or Composite using Recursion Prime Number: A number that is only divisible by 1 and itself. Composite Number: A number that is not a prime number. Note: 1 is neither prime nor composite. Below is a program to find whether the user input number is a prime number or a … Read more

SVG

svg circle

SVG <circle> SVG Circle – <circle> The <circle> element is used to create a circle. Example :   <!DOCTYPE html> <html> <body> <svg height=”100″ width=”100″> <circle cx=”50″ cy=”50″ r=”40″ stroke=”black” stroke-width=”3″ fill=”red” /> Sorry, your browser does not support inline SVG. </svg> </body> </html>

SVG – Scalable Vector Graphics

SVG – Scalable Vector Graphics <!DOCTYPE html> <html> <body> <h1>My first SVG</h1> <svg width=”100″ height=”100″> <circle cx=”50″ cy=”50″ r=”40″ stroke=”green” stroke-width=”4″ fill=”yellow” /> Sorry, your browser does not support inline SVG. </svg> </body> </html> Output:   SVG stands for Scalable Vector Graphics. SVG defines vector-based graphics in XML format. What is SVG? SVG stands for … Read more

C++ Hello World

lcm program in c

C++ Hello World Let’s break up the following code to understand it better: Example #include <iostream> using namespace std; int main() { cout << “Hello World!”; return 0; } Example explained Line 1: #include <iostream> is a header file library that lets us work with input and output objects, such as cout (used in line 5). Header files add functionality to C++ programs. Line … Read more

PHP MySQL connector

PHP MySQL connector Example:  <html> <head> <title>Connecting MySQL Server</title> </head> <body> <?php $dbhost = ‘localhost:3306’; $dbuser = ‘guest’; $dbpass = ‘guest123’; $conn = mysql_connect($dbhost, $dbuser, $dbpass); if(! $conn ) { die(‘Could not connect: ‘ . mysql_error()); } echo ‘Connected successfully’; mysql_close($conn); ?> </body> </html> PHP 5 and later can work with a MySQL database using: … Read more

LOCATE() – MySQL Function

MySQL Function

LOCATE() – MySQL Function The LOCATE() function returns the position of the first occurrence of a substring in a string. If the substring is not found within the original string, this function returns 0. This function performs a case-insensitive search. LOCATE(substring, string, start) Parameter Description substring Required. The substring to search for in string string … Read more

Buffer Overflow Vulnerabilities

Buffer overflow vulnerabilities occur when an application copies user-controllable data into a memory buffer that is not sufficiently large to accommodate it. The destination buffer is overflowed, resulting in adjacent memory being overwritten with the user’s data. Depending on the nature of the vulnerability, an attacker may be able to exploit it to execute arbitrary … Read more