C Programming Experiments: Arrays, Pointers, and String Manipulation
Experiment 1: Finding Minimum and Maximum Values
This experiment demonstrates how to find the minimum and maximum values in an array using pointers.
#include <stdio.h>
#define SIZE 6
void read_data(int arr[], int size);
void display_data(int arr[], int size);
void find_extremes(int arr[], int size, int* min_ptr, int* max_ptr);
int main( ...
Posted on Fri, 30 Oct 2026 16:08:02 +0000 by blmg911
Generating Random Chinese Names with Python
Generating Random Chinese Names with Python
Introduction
Random name generation is a frequent requirement in Python development, appearing in various scenarios including data simulation, testing environments, and applications that need to create fictional user accounts. This guide explores practical approaches to generating authentic-sounding ...
Posted on Thu, 22 Oct 2026 16:17:13 +0000 by gusaps
Understanding Escape Sequences in Python
Escape sequences in Python strings serve to represent special characters that either cannot be typed directly or carry specific formatting functions. These are denoted by a backslash (\) and instruct Python to interpret the following character differently from its literal meaning.
Common Escape Sequence Functions
\n — Line Feed
print('first lin ...
Posted on Wed, 14 Oct 2026 16:28:36 +0000 by makeshift_theory
Python Fundamental Data Types
Numbers (int)
Overview
Python supports several numeric types including integers, long integers, and floating-point numbers.
Integers: Basic whole numbers like 1, 11, 22, 36
Long Integers: Extended integer values that maintain integer properties, such as 154864131, 548798466111131313
Floating Point: Numbers with decimal points like 3.14, 0.78, ...
Posted on Tue, 13 Oct 2026 16:20:22 +0000 by meral
Distinguishing Strings from Sequences in Python
Determining Whether a Value Is a String or a Sequenec
In Python, distinguishing between string and sequence types (e.g., lists, tuples, or other iterable containers) requires careful type inspection—especially since strings are technical sequences themselves but often need special handling.
Core Strategy
Use isinstance() with precise type check ...
Posted on Sun, 11 Oct 2026 16:47:36 +0000 by therealairness
Control Flow and Composite Data Types in Python
1. Strings
1.1 Using the format() Method to Format Strings
Use the format() method to format strings with the following syntax:
string_to_format.format(real_data1, real_data2, ...)
Description:
The string to be formatted uses {} as placeholders for the actual data.
Example 1:
name = 'Alice'
template = 'Name: {}'
print(template.format(name))
...
Posted on Mon, 21 Sep 2026 16:13:14 +0000 by shmony
Mastering Arrays in C: From Basic Concepts to Practical Applications
1. Array Fundamentals
An array is a contiguous block of memory that stores elements of the same data type. Unlike individual variables, arrays enable efficient storage and manipulation of multiple related values using a single identifier and an index.
2. One-Dimensional Arrays
2.1 Declaring One-Dimensional Arrays
The declaration processs follow ...
Posted on Sun, 20 Sep 2026 16:33:17 +0000 by ichversuchte
Comprehensive Python Fundamentals for Beginners
Data Types and Variables
Python uses indentation to organize code blocks, typically with 4 spaces. Use # for single-line comments. Each line represents a statement, and when a statement ends with a colon (:), the indented statements form a code block. Python is case-sensitive.
Integers
Python can handle arbitrarily large integers, including neg ...
Posted on Sun, 30 Aug 2026 16:49:23 +0000 by kpmonroe
Pointer Manipulation and String Operations in C
Finding Minimum and Maximum Values Using Pointers
Version 1: Passing Pointers for Min/Max Output
This approach uses output parameters through pointers to return both the minimum and maximum values from an array.
#include <stdio.h>
#define SIZE 5
void read_values(int arr[], int count);
void display_values(int arr[], int count);
void locat ...
Posted on Wed, 19 Aug 2026 16:51:53 +0000 by Joefunkx
Finding Min/Max Values, String Manipulation, and Pointer Usage in C
Task 1.1: Finding Minimum and Maximum in an Array Using Pointers
This program reads five integers into an array, then finds the minimum and maximum values using a function that modifies values through pointer parameters.
#include <stdio.h>
#define SIZE 5
void read_array(int arr[], int len);
void print_array(int arr[], int len);
void get_ ...
Posted on Wed, 19 Aug 2026 16:12:57 +0000 by bladecatcher