Blog

python tutorials and learn python

Created with Sketch.

C Program to Find the Size of int, float, double and char

C Program to Find the Size of int, float, double and char This program declares 4 variables of type int, float, double and char. Then, the size of each variable is evaluated using sizeof the operator. Example: Program to Find the Size of a variable   Output Size of int: 4 bytes Size of float:…
Read more

C Program to Compute Quotient and Remainder

C Program to Compute Quotient and Remainder This program evaluates the quotient and remainder when an integer is divided by another integer. Program to Compute Quotient and Remainder   Output Enter dividend: 25 Enter divisor: 4 Quotient = 6 Remainder = 1 In this program, the user is asked to enter two integers (dividend and…
Read more

C Program to Find ASCII Value of a Character

C Program to Find ASCII Value of a Character In C programming, a character variable holds an ASCII value (an integer number between 0 and 127) rather than the character itself. You will learn how to find the ASCII value of a character in this program. A character variable holds an ASCII value (an integer…
Read more

C Program to Multiply two Floating Point Numbers

C Program to Multiply two Floating Point Numbers In this program, the user is asked to enter two numbers (floating point numbers). Then, the product of those two numbers is stored in a variable and displayed on the screen.   Program to Multiply Two Numbers Output Enter two numbers: 2.4 1.12 Product = 2.69 In…
Read more

C Program to Add Two Integers

C Program to Add Two Integers In this program, the user is asked to enter two integers. Then, the sum of those two integers is stored in a variable and displayed on the screen. Program to Add Two Integers Output Enter two integers: 12 11 12 + 11 = 23 In this program, user is…
Read more

C Program to Print an Integer (Entered by the User)

C Program to Print an Integer (Entered by the User) In this program, integer entered by the user is stored in a variable. Then, that variable is displayed on the screen using printf() function. Program to Print an Integer Output Enter a integer: 25 You entered: 25 In this program, an integer variable number is declared.…
Read more

Program to Display “Hello, World!”

C “Hello, World!” Program 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. Program to Display “Hello, World!” Output Hello, World! How “Hello, World!” program works? The #include <stdio.h> is a preprocessor command. This command…
Read more

Python program to search an element in a doubly linked list.

Python program to search an element in a doubly linked list. In this program, we need to search a given node in a doubly linked list. To solve this problem, we will traverse through the list using a node current. Current points to head and start comparing searched node data with current node data. If…
Read more

Python program to rotate doubly linked list by N nodes.

Python program to rotate doubly linked list by N nodes. In this program, we need to create a doubly linked list and rotate it by n node. This can be achieved by maintaining a pointer that starts from the head node and traverses the list until current points to the nth node. Move the list…
Read more

Python program to remove duplicate elements from a Doubly Linked List.

Python program to remove duplicate elements from a Doubly Linked List. In this program, we will create a doubly linked list and remove the duplicate, if present, by traversing through the list. List after removing duplicates: In the above list, node2 is repeated thrice, and node 3 is repeated twice. Current will point to head,…
Read more