C Error Handling

For handling of errors and exceptions, C language does not provide any direct support. However, there are many ways through ... the numerator: 5 Enter the denominator: 0 ALert! Divide by zero error is encountered in your program.   Loading…

C++ Data Types

Variables in C++  allocate the memory to store the values in the program. C++ Data types are the type of data that the varia ... in C++ There are three types of derived data types in C++. They are listed below: Array Function Pointer Loading…

Pointer and Arrays

Please refer to these sites before learning the tutorial below to understand the topic in more depth. (adsbygoogle ... e = window.adsbygoogle || []).push({});   Loading...

Basic Euclidean vector operations in C++

Euclidean vectors are very important quantity in mathematics, applied mathematics, physics, engineering etc. Formally vect ... es, please ask in the form of comment. (adsbygoogle = window.adsbygoogle || []).push({}); Loading...

C Programming Functions

Contents (adsbygoogle = window.adsbygoogle || []).push({}); 1 What is a function in C? 2 How to use the funct ... s respective calling function. Output Enter any two numbers: 3 4 The sum of any two given numbers is: 7   Loading…

Python Class and Objects

A class represents a blueprint for the object in any programming language. Python has efficient methods for handling classes ... _module__) The output of the above program is:- None {‘name’: ‘John Doe’, ‘id’: 1001, ‘age’: 21} __main__ Loading…

Object Oriented Programming in Python

Python supports different programming approach where the Object Oriented approach is also one. In this approach, the solutio ... s is C++, Python, Java, .Net, C#, etc. Example of procedural languages are: C, Fortran, Pascal, VB etc.   Loading…

Python File Operation

File handling is one of the important operations that a programming language provides. (adsbygoogle = window.adsbygo ... the specified string to a file 13 File.writelines(seq) It writes a sequence of the strings to a file.   Loading…

Python Directory and Files Management

A directory is a collection of files or sub-directories where you can store and manage a large number of data. Python provid ... listdir()) os.rmdir('test_new') print(os.listdir()) The output is:- [‘open.py’, ‘dir1’, ‘hello.txt’] Loading…

Python Constructor

A constructor is used to initialize a class when its instance is created. The first parameter of the constructor is always ... dsbygoogle = window.adsbygoogle || []).push({}); This is non parametrized constructor Hello John Snow Loading…

Python Global, Local and Nonlocal variables

The scope of a variable plays an important role in any programming language. Variables in Python are categorized into three ... inner() print("outer:", x) outer() The output of the above program is:- inner: 20 outer: 20 Loading…

CSV Files in Python

Contents (adsbygoogle = window.adsbygoogle || []).push({}); 1 What is a CSV File? 2 What are CSV methods prov ... delimiter = ',' quoting=csv.QUOTE_ALL, skipinitialspace=True) reader = csv.reader(f, dialect='myDialect1') Loading…

Gaussian blurring using separable kernel in C++

Gaussian blurring is used to reduce the noise and details of the image. It reduces the image’s high frequency components a ... namedWindow("initial"); imshow("initial", src); waitKey(); return 0; } Loading…

Calculation of Discrete Fourier Transform(DFT) in C/C++ using Naive and Fast Fourier Transform (FFT) method

Discrete Fourier Transform has great importance on Digital Signal Processing (DSP). There are many situations where analy ... ).push({}); Note: The output is verified using Matlab’s function fft2(X)

Tic Tac Toe Game Project using Python

Tic tac toe is a very popular game and we are going to implement the tic tac toe game using Python programming. Let us exam ... e output of the above program is as below:- (adsbygoogle = window.adsbygoogle || []).push({}); Loading…

Python Modules and Packages

Contents (adsbygoogle = window.adsbygoogle || []).push({}); 1 What are the modules in Python? 2 How do I crea ... ing module from a package We import modules from the package using a dot operator import Game.Level.start Loading…

New Standard Flowchart of for loop.

An ISO committee purposed a new Standard Flowchart of for loop. The previous flowchart of for loop is same as that of whi ... ush({}); Now consider a small code segment for(A = 0; A The flowchart for this statement is  Loading...

C program to copy the elements of one string to the another

Refer to the following pages to learn the basics before learning this example. (adsbygoogle = window.adsbygoogle || ... .adsbygoogle || []).push({}); Output: Enter the string: Programming Techniques Programming Techniques Loading…

C Memory Allocation

In this tutorial, you will learn about the mechanisms for the allocation of memory. As C is a structured language, it consis ... ions C program implementing calloc() and free() functions C program implementing realloc() functions Loading…

Python Numbers

Number data types in Python stores numeric values. They are created when a certain value is assigned to them. Python provide ... andom.choice(['red', 'black', 'green'])) 0.09099355418641308 0.2134112147897207 0.4875695623935453 7 red Loading…