We can use a two-dimensional array of elements of type char to store strings, where each row holds a separate string. In this way you can store a whole bunch of strings and refer to any of them through a single variable name
Author Archives: Veeresh P S
Pointers in c – a first look
In C programming, a pointer is a variable that stores the memory address of another variable. A pointer to a value of type char is pointing to a value occupying 1 byte, whereas a pointer to a value of type long is usually pointing to the first byte of a value occupying 4 bytes. This means that every pointer will be associated with a specific variable type, and it can be used only to point to variables of that type.
Strings in C – Part 1
A string constant is a sequence of characters or symbols between a pair of double-quote characters. Anything between a pair of double quotes is interpreted by the compiler as a string, including any special characters and embedded spaces.
Unlock Your Career Potential: The Power of Personal Projects in Embedded Systems
In the rapidly evolving field of embedded systems, standing out requires more than just a degree and professional experience. While academic achievements and job roles are important, personal projects can be the key to unlocking your career potential. These projects offer a unique way to demonstrate your skills, creativity, and passion. Let’s dive into why personal projects are essential for building a compelling embedded systems portfolio and how they can propel your career forward.
Arrays in C – part 2
Lean about Finding the Size of an Array, Multidimensional Arrays, Initializing Multidimensional Arrays, Processing Multidimensional Arrays
Arrays in C – part 1
An array is a fixed number of data items that are all of the same type. The data items in an array are referred to as elements. The elements in an array are all of type int, or of type long, or all of any type you choose. Array declaration: The array declaration is similar toContinue reading “Arrays in C – part 1”
unions in C
An union in C is a user-defined data type that allows you to store different types of data in the same memory location. Unlike structures, where each member has its own memory space, in a union, all members share the same memory space. The size of a union is determined by the size of its largest member.Continue reading “unions in C”
Bit Fields in C
Bit fields in C allow you to define a structure member that spans a specific number of bits. This feature is useful when you need to work with data at the bit level, particularly when dealing with hardware interfaces, protocol structures, or memory-constrained systems. Bit fields provide a way to compactly represent data with specificContinue reading “Bit Fields in C”
Structure padding and packed attribute in C programming
Structure padding is a concept in C where the compiler inserts additional bytes between structure members to align them in memory. This padding ensures that each member starts at an address that adheres to the alignment requirements of the target architecture. Padding is introduced to improve memory access efficiency, as accessing aligned memory locations is generallyContinue reading “Structure padding and packed attribute in C programming”
Structure in C programming
In C, a structure is a user-defined data type that allows you to group together variables of different data types under a single name. Each variable within a structure is called a member or a field. Structures provide a way to organize and represent complex data in a more meaningful and coherent manner. The syntax for definingContinue reading “Structure in C programming”