One dimensional array – C

Use of array to store a ‘string’ of characters. In the code below you’ll notice I’ve specified the array size as ’12’ which corresponds to the number of characters in ‘Hello World!’ including the white space. Not specifying the array size, i.e using arr[] = “Hello World!” would have automatically defined the size as 12. Doing this it would need to need to call the array values through [Read More]

Playing with the C language

Points to remember while coding in C : – put newline (\n) in your printf so as the output does not overlap with the terminal prompt. – keep clean tab spaces to make code reading easier. – put a getchar() to prevent the program from vanishing after execution (unlikely to happen if run from terminal). Here’s a short program to recall the basics. :-) #include int main() { int age; printf("Please enter your [Read More]