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...
Chapter 6 Pointer A pointer is a variable that stores the address of another VARIABLE i j 72 87994 address → 87994 ,87998 j is a pointer j points to i The address of “(&) ope1qreator The address of operator is used to obtain the address of the given variable If you refer to the diagram above &i⇒ 87994 &j ⇒87998 Format specifier for printing pointer address is ‘%u’ The value at address operator(*) The value at address or *operator is used to obtain the value present at a given memory address. It is denoted by * *(&i) =72 *(&j) =87994 How to declare a Pointer ? A pointer is declared using the following syntax int *j; ⇒ declare a variable j of typr int-pointer j=&i ⇒ Store address of in j Just like a pointer of type integer, We also ha...
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...
Comments
Post a Comment