Keywords: C programming, strings, character arrays, arrays, concatenation of strings, comparison of strings, length of strings, input/output of strings, and string format specifiers. One of the most widely used programming languages for a variety of applications is C. The effective handling of strings is one of the main strengths of C programming. A string in C programming is just an array of characters that are terminated by the null character ('0'). Character arrays, commonly known as string arrays, are necessary when w...
Hello guys this is the first chapter of c programming , In this chapter we will learn about basics of c programming ; Here we go to learn c language, Chapter 1 Variable, contest &keywords Variable :- A Variable is a container which stores a 'value' Like in kitchen we use containers storing rice ,Dal,Suger etc. Similarly, To that Variable in c Stores Value of a constast . Example: A=3; //a is assinged"3" b=4.7; //b is assigned "4.7" c='A' ; //c is assinged "a" Rules of naming variable in C :- 1. First character must be an alphabet or underscore(_). 2. No commas , blanks allowed 3. No special symbol other than (_) allowed. 4. variable names are case sensitive We Must create meaningful variable names in our programs. This enhance raedabibly of our programs. Ques: What is variab...
Function and Recursion Sometimes our program gets bigger in size and its not possible for a programmer to track which piece of code is doing what function is a way to break our code into chunks so that it is possible for a programmer to reuse them. What is a Function? A function is a block of code that performs a particular task, A function can be reused by the programmer in a given program any number of time example and syntax of a function #include<stdio,h> void display () ——> function prototype int main(){ int a; display(); ———> function call return 0; } void display () { ———> function definition printf(”Hi i am display”); } Function prototype Function prototype Declaration The function prototype is a way to tell the compiler about the function we are going to define in the program Here void indicates that the function returns nothing Function call Function call is a way to tell the compiler to execute the function body at the time...
Comments
Post a Comment