String
String
Unit 2
Lecture-4
Unit-2 Syllabus
Control structures: Decision statements; if and switch statement; Loop
control statements: while, for and do while loops, jump statements,
break, continue, goto statements.
Arrays: Concepts, One dimensional array, declaration and initialization
of one dimensional arrays, two dimensional arrays, initialization and
accessing, multi dimensional arrays.
Functions: User defined and built-in Functions, storage classes,
Parameter passing in functions, call by value, Passing arrays to functions:
idea of call by reference, Recursion.
Strings: Arrays of characters, variable length character strings, inputting
character strings, character library functions, string handling functions.
In this Lecture
scanf("%[^\n]s", str);
Function Name Description
strcmp(str1, str2)
Copies the contents of string s2 to string s1.
<String.h>
strings are the same it returns 0.