Server Side Programming Articles

Page 2 of 2108

Difference between !== and ==! operator in PHP

Mahesh Parahar
Mahesh Parahar
Updated on 14-Mar-2026 610 Views

In PHP, !== and ==! may look similar but behave very differently. !== is a single operator (strict not-equal), while ==! is actually two operators combined: the equality operator == followed by the logical NOT ! applied to the right operand. !== (Strict Not-Equal Operator) The !== operator is a single comparison operator that checks if two values are not equal OR not of the same type. It does not perform type conversion. For example, 1 !== '1' returns true because the types differ (integer vs string). // !== checks value AND type var_dump(1 !== '1'); ...

Read More

Difference between float and double in C/C++

Mahesh Parahar
Mahesh Parahar
Updated on 14-Mar-2026 2K+ Views

In C/C++, float and double are data types used to represent floating-point numbers (numbers with a decimal part). The key difference is precision − double has twice the precision of float, which means it can represent numbers with more decimal digits of accuracy. Precision and Storage float uses 32 bits (1 sign bit, 8 exponent bits, 23 mantissa bits) and provides about 6–7 significant decimal digits of precision. double uses 64 bits (1 sign bit, 11 exponent bits, 52 mantissa bits) and provides about 15–16 significant decimal digits of precision. Key Differences Feature float ...

Read More

Difference between Structure and Array in C

Mahesh Parahar
Mahesh Parahar
Updated on 14-Mar-2026 7K+ Views

In C, both structures and arrays are used as containers to store data. The key difference is that a structure can hold variables of different data types, while an array can only hold variables of the same data type. Example The following example demonstrates the difference between a structure and an array in C ? #include // Structure: holds different data types struct Student { char name[20]; int age; float gpa; }; int main() { // Structure ...

Read More

Difference between system level exception and Application level exception.

Mahesh Parahar
Mahesh Parahar
Updated on 14-Mar-2026 3K+ Views

An exception is an unwanted event that interrupts the normal flow of a program. In C#, exceptions are broadly categorized into System Level Exceptions (thrown by the CLR for fatal errors) and Application Level Exceptions (thrown by application code for recoverable errors). System Level Exception System level exceptions are derived from System.SystemException and are thrown by the .NET Common Language Runtime (CLR). They represent non-recoverable or fatal errors such as stack overflow, out of memory, null reference, or database crashes. These exceptions are generally not handled by application code. Common examples − NullReferenceException, StackOverflowException, OutOfMemoryException, IndexOutOfRangeException. ...

Read More

Difference between var and dynamic in C#

Mahesh Parahar
Mahesh Parahar
Updated on 14-Mar-2026 6K+ Views

In C#, var and dynamic are two ways to declare variables without explicitly specifying the type. The key difference is when the type is determined − var resolves the type at compile time, while dynamic resolves it at runtime. var (Implicitly Typed) var was introduced in C# 3.0. It is a statically typed variable whose data type is inferred by the compiler at compile time based on the value assigned during initialization. A var variable must be initialized at the time of declaration, otherwise the compiler throws an error. dynamic (Dynamically Typed) dynamic was introduced in ...

Read More

Difference between const char* p, char * const p, and const char * const p in C

Mahesh Parahar
Mahesh Parahar
Updated on 14-Mar-2026 13K+ Views

In C programming, *p represents the value stored at the address a pointer points to, and p represents the address itself. The const keyword can be applied to the char value, the pointer, or both. The thumb rule is to read declarations from right to left. The Three Declarations Declaration Read Right-to-Left Change Value (*p)? Change Pointer (p)? const char *p p is a pointer to a constant char No Yes char * const p p is a constant pointer to a char Yes No const char * const p ...

Read More

Difference between const int*, const int * const, and int const * in C

Mahesh Parahar
Mahesh Parahar
Updated on 14-Mar-2026 4K+ Views

In C programming, *p represents the value stored at the address a pointer points to, and p represents the address itself. The const keyword can be applied to either the pointer, the value it points to, or both, creating different levels of immutability. The thumb rule for reading these declarations is to read from right to left. The Three Declarations Declaration Read Right-to-Left Change Value (*p)? Change Pointer (p)? const int *p p is a pointer to a constant int No Yes int const *p p is a pointer to a ...

Read More

Difference between Python and PHP.

Mahesh Parahar
Mahesh Parahar
Updated on 14-Mar-2026 578 Views

Python and PHP are both popular programming languages but serve different primary purposes. Python is a general-purpose language used across many domains, while PHP is primarily a server-side scripting language designed for web development. Python Python is a high-level programming language with a large built-in standard library. It was developed by Guido van Rossum, with its first version released in 1990. Python emphasizes clean syntax and readability, making it suitable for a wide range of applications from web development to data science and AI. Example # Python: clean, concise syntax languages = ["Python", "PHP", "Java"] ...

Read More

Difference between Goroutine and Thread in Golang.

Mahesh Parahar
Mahesh Parahar
Updated on 14-Mar-2026 977 Views

Goroutines and threads are both mechanisms for concurrent execution, but they work at different levels. Goroutines are lightweight, user-space concurrency primitives managed by the Go runtime, while threads are OS-level constructs managed by the operating system kernel. Goroutine A goroutine is a function or method that executes independently and concurrently with other goroutines. Every concurrent activity in Go is typically implemented as a goroutine. Goroutines start with just a few kilobytes of stack space (which grows dynamically) and are multiplexed onto a small number of OS threads by the Go runtime scheduler. Example The following program launches two goroutines that ...

Read More

How to call a function with argument list in Python?

Sarika Singh
Sarika Singh
Updated on 13-Mar-2026 4K+ Views

The purpose of a function is to perform a specific task using code blocks. Functions save time by eliminating unnecessary copying and pasting of code. If you need to make a change, you only update the function in one place rather than searching through your entire program. This follows the DRY (Don't Repeat Yourself) principle in software development. Defining a Function in Python Python functions are created using the following syntax − def function_name(parameters): function body A function is defined using the def keyword followed by the function name and ...

Read More
Showing 11–20 of 21,076 articles
Advertisements