Articles on Trending Technologies

Technical articles with clear explanations and examples

How to Add Two Numbers in PHP Program?

PHP
AYUSH MISHRA
AYUSH MISHRA
Updated on 15-Mar-2026 24K+ Views

In PHP, adding two numbers is a fundamental arithmetic operation that can be performed using various approaches. This article demonstrates different methods to add two numbers in PHP programming. Basic Addition Example Before exploring different approaches, let's look at a simple example − Result: 20 The addition of 8 + 12 gives 20 as the result. Now let's explore different approaches to implement this operation. Method 1: Direct Addition This is the simplest approach using the plus (+) operator directly between two variables ? Syntax ...

Read More

How to declaring pointer variables in C/C++?

Anvi Jain
Anvi Jain
Updated on 15-Mar-2026 634 Views

A pointer is a variable that stores the memory address of another variable. To declare pointer variables in C, we use the asterisk (*) operator before the variable name during declaration. Syntax data_type *pointer_name; Where data_type is the type of variable the pointer will point to, and pointer_name is the name of the pointer variable. Basic Pointer Declaration and Usage Here's how to declare and use pointer variables in C − #include int main() { // A normal integer variable int ...

Read More

How to compare pointers in C/C++?

Tapas Kumar Ghosh
Tapas Kumar Ghosh
Updated on 15-Mar-2026 9K+ Views

Pointers in C can be directly compared using relational operators to check their memory addresses. This allows us to determine equality, ordering, and relative positions of pointers in memory. Syntax pointer1 == pointer2 // Equality comparison pointer1 != pointer2 // Inequality comparison pointer1 < pointer2 // Less than comparison pointer1 > pointer2 // Greater than comparison pointer1 = pointer2 // Greater than or equal Pointer Comparison in C In C, we can compare pointers using relational operators ...

Read More

PHP Program to Print Multiplication Table

PHP
AYUSH MISHRA
AYUSH MISHRA
Updated on 15-Mar-2026 9K+ Views

A multiplication table is a useful mathematical tool that displays the products of a given number with a range of values, typically from 1 to 10. In this article, we will learn multiple ways to generate and print multiplication tables in PHP. Formula to Generate Multiplication Table To create a multiplication table for any number, use the formula ? Answer = Number × Multiplier Where: Number is the fixed value for which the table is generated Multiplier is the range of values (e.g., 1 ...

Read More

PHP Program for Binary to Decimal Conversion

PHP
AYUSH MISHRA
AYUSH MISHRA
Updated on 15-Mar-2026 6K+ Views

Binary to decimal conversion is the process of converting a binary number (base-2 number using only 0s and 1s) into its equivalent decimal number (base-10 form). In this article, we will learn how to convert binary numbers to decimal form in PHP using different approaches. How Binary to Decimal Conversion Works To convert a binary number to decimal, multiply each binary digit by 2 raised to the power of its position (starting from 0 on the right), then sum all results ? Binary to Decimal Conversion: 1011 Position: ...

Read More

The best way to check if a file exists using standard C/C++

Nishtha Thakur
Nishtha Thakur
Updated on 15-Mar-2026 18K+ Views

In C programming, checking if a file exists is a common task that can be accomplished by attempting to open the file for reading. If the file opens successfully, it exists; otherwise, it doesn't exist. Syntax FILE *fopen(const char *filename, const char *mode); Method 1: Using fopen() Function The most straightforward approach is to use fopen() to attempt opening the file in read mode − #include int main() { FILE *file; /* Try to open file for ...

Read More

How to write my own header file in C?

Anvi Jain
Anvi Jain
Updated on 15-Mar-2026 2K+ Views

Creating your own header file in C allows you to organize and reuse code across multiple programs. A header file typically contains function declarations, constants, and macros that can be included in other C files. Syntax #include "your_header_file.h" Steps to Create a Custom Header File Create the header file: Write your functions and save with .h extension Include in main program: Use #include "filename.h" (quotes, not angle brackets) Ensure same directory: Both files must be in the same folder Call functions: Use the functions directly in your main program Header File: ...

Read More

PHP Program to Count Vowels in a String

PHP
AYUSH MISHRA
AYUSH MISHRA
Updated on 15-Mar-2026 8K+ Views

A string is a sequence of characters, including alphabets, numbers, and symbols. In this tutorial, we are going to learn how we can count the number of vowels in a given string in PHP using different approaches. Vowels in English are a, e, i, o, u, and they can be either uppercase or lowercase. What is a Vowel? Vowels are alphabetic characters that represent specific speech sounds. There are a total of five vowels, both uppercase and lowercase in the English language: a, e, i, o, u A, E, I, O, U Example 1 ...

Read More

How to use use an array of pointers (Jagged) in C/C++?

Smita Kapse
Smita Kapse
Updated on 15-Mar-2026 742 Views

In C programming, an array of pointers (also known as jagged arrays) allows you to store multiple pointers in a single array. This is particularly useful when working with strings of different lengths or when you need to point to different memory locations dynamically. Syntax data_type *array_name[size]; Where data_type is the type of data the pointers will point to, and size is the number of pointers the array can hold. Example 1: Array of Integer Pointers The following example demonstrates how to create an array of pointers that point to integer values − ...

Read More

How to Install phpMyAdmin with Nginx on Ubuntu?

Mead Naji
Mead Naji
Updated on 15-Mar-2026 338 Views

When you try to build a website for production or just start learning web development, you need a server to make your web application accessible from the browser to other users, either to use it or test its functionality. Nginx is a better choice for a server to serve websites. It is known for its efficiency and capacity to handle large traffic. Nginx can also work as a reverse proxy and load balancer. The pronunciation of the word "Nginx" is like this: engine-x. phpMyAdmin is a web interface to manage MySQL and MariaDB databases. It allows us to ...

Read More
Showing 21801–21810 of 61,298 articles
Advertisements