Mini project Snake game using C

The snake game is a simple console-based game developed in C programming language. It is suited for mini-projects. This ... You can download the source code here. (adsbygoogle = window.adsbygoogle || []).push({}); Loading...

Python Program to Create a Class and Get All Possible Subsets from a Set of Distinct Integers

In this example, we will write a python program to create a class and get all possible subsets from a set of distinct integ ... rsive function that generates all the sublist until the list becomes empty. The final result is printed. Loading…

C program to compare two strings

This program will ask for two different strings from the users. We will be using the string function strcmp() here to concl ... ter until there is a mismatch in the string. (adsbygoogle = window.adsbygoogle || []).push({}); Loading…

C preprocessors

In this tutorial, you will learn about the preprocessor in C. Preprocessor is a very exciting feature of C programming that ... (adsbygoogle = window.adsbygoogle || []).push({}); Output: Enter the radius: 7 Area = 153.933502 Loading…

C Pointers

In this tutorial, you will learn about the pointers in C. Pointers are the most distinct and exciting feature of C language ... 0 is stored at address 6487580 10 is stored at address 6487580 10 is stored at address 6487580 Now x= 25 Loading…

C Command Line Arguments

In C, the most important function is the main() function. We mostly define the main() function either with a return type in ... he last argument supplied. If there are no arguements supplied, then the default value of argc will be 1. Loading…

Contacts Manager – Mini Project in C with source code

This is one of the mini-project that you can get started with C projects. The project is Contacts Manager using a C program ... ======================\n\n"); for(i=97;i Loading... (adsbygoogle = window.adsbygoogle || []).push({});

C Files

There is plenty of function in C language to handle file Input/Output(I/O)  operations. Here in this article, you will learn ... ays the output as below. Output: The value inside the file is: Hello! this is my file by using fprintf… Loading…

C++ Comments

A C++ comment is a piece of descriptive text which explains some aspect of a program. The compiler totally ignores the prog ... Second Program Loading...

C Recursion

In this tutorial, you will learn about the recursive function. Recursive functions are the functions which will call themsel ... pping condition. Otherwise, the program won’t stop which may also lead to the crashing of the system.     Loading...

C++ «Hello World!» Program

C++ “Hello World!”  program is one of the simplest C++ programs. It displays the output “Hello World!”. (adsbygoogl ... gle = window.adsbygoogle || []).push({}); Loading...

C++ Input/Output

C++ Input/Output function takes input from the standard input device and compute and then gives the computed result to the ... tax: cout.setf(arg1,arg2); 4.unsetf() This function is used for removing the flag setting.             Loading...

C++ Variables & Constants

Contents (adsbygoogle = window.adsbygoogle || []).push({}); 1 C++ Variables 2 Variable Definition in C++ 3 ... //string constant having single character. "Sun is hot.\n" //prints string with newline Loading…

C++ Operators

C++ operators are symbols that are used in the C++ program to form an expression.C++ has a large set of operators. It includ ... e and decrease the values of the operand respectively. Operators Used For + Increment – Decrement   Loading…

Introduction to C++ Programming language

Contents (adsbygoogle = window.adsbygoogle || []).push({}); 1 Definition of C++ 2 Benefits of C++  Over C Lan ... ages and are closer to the hardware and therefore are the ideal choice for such compilation systems.       Loading…

Random number generation in C/C++

Many programs need a random number to complete their certain goal. For example, a quiz program needs random number to ran ... ing namespace std; int main(){ int n; srand(time(NULL)); n = rand() % 10; cout Loading...

C++ Tutorial: File Handling in C++

Opening and Closing Files In C++, a file is opened by either of two ways. First way is the constructor function of the ... myfile.txt”); //some operation fin.close(); (adsbygoogle = window.adsbygoogle || []).push({}); Loading…

RSA Algorithm Explained with C code

An RSA algorithm is an important and powerful algorithm in cryptography. It is widely used in Digital Signature and in an ... dular_exponentiation(c, d, n); printf("Message is decrypted to %d\n", m); return 0; } About Author   Loading…

C++ Tutorial: Function Templates

Function Templates Function templates are used to reduce the repeated code. I want to make you clear about function tem ... return result; } int main(){ int a = 5, b = 6; float x = 2.7, y = 9.3; cout Loading...

Fastest Fibonacci Sequence/Number Computation

The fastest way (in O(n)) of calculating Fibonacci sequence is by using matrix multiplication approach using following rel ... **) malloc(sizeof(unsigned long long*) * len); for (i = 0; i %llu\n", temp, result[1]); return 0; } Loading…