A string is a data type used in programming, such as an integer and floating point unit, but is used to represent text rather than numbers. It is comprised of a set of characters that can also contain spaces and numbers. For example, the word "hamburger" and the phrase "I ate 3 hamburgers" are both strings.
C Programming/Strings. A string in C is merely an array of characters. The length of a string is determined by a terminating null character: '-' . So, a string with the contents, say, "abc" has four characters: 'a' , 'b' , 'c' , and the terminating null character.
A string is a data type used in programming, such as an integer and floating point unit, but is used to represent text rather than numbers. It is comprised of a set of characters that can also contain spaces and numbers. For example, the word "hamburger" and the phrase "I ate 3 hamburgers" are both strings.
C Programming/Strings. A string in C is merely an array of characters. The length of a string is determined by a terminating null character: '-' . So, a string with the contents, say, "abc" has four characters: 'a' , 'b' , 'c' , and the terminating null character.
• List is a collection, which is ordered and changeable. Allows duplicate members.
• Tuple is a collection, which is ordered and unchangeable. Allows duplicate members.
• Set is a collection, which is unordered and unindexed. No duplicate members.
• Dictionary is a collection, which is unordered, changeable and indexed. No duplicate members.
: String, List, Tuple, Dictionary
• List is a collection, which is ordered and changeable. Allows duplicate members.
• Tuple is a collection, which is ordered and unchangeable. Allows duplicate members.
• Set is a collection, which is unordered and unindexed. No duplicate members.
• Dictionary is a collection, which is unordered, changeable and indexed. No duplicate members.
02 of 03 parts
Get Part 1 from https://www.slideshare.net/ArunUmrao/notes-for-c-programming-for-bca-mca-b-sc-msc-be-amp-btech-1st-year-1
Get Part 3 from https://www.slideshare.net/ArunUmrao/notes-for-c-programming-for-bca-mca-b-sc-msc-be-amp-btech-1st-year-3
C is a general-purpose, procedural computer programming language supporting structured programming, lexical variable scope, and recursion, while a static type system prevents unintended operations. C provides constructs that map efficiently to typical machine instructions and has found lasting use in applications previously coded in assembly language. Such applications include operating systems and various application software for computers, from supercomputers to PLCs and embedded system.
Chapter 3 Classes and Objects 3
2.1 The Nature of Objects 4
2.2 Relationships among Object 7
2.3 The Nature of Classes 10
2.4 Relationships among Classes 11
2.5 Interplay of Classes and Objects 14
2.6 Identifying Classes and Objects 15
2.7 Importance of Proper Classification 18
2.8 Key abstractions and Mechanism 19
Chapter 2 The Object Model
2.1 The Evolution of the Object Model
2.2 Foundations of the Object Model
2.3 Elements of the Object Model
2.4 Applying the Object Model
Chapter 1 Complexity 4
1.1 The Structure of Complex Systems 6
1.2 The Inherent Complexity of Software 8
1.3 The Five Attributes of a Complex System 11
1.4 Organized and Disorganized Complexity 12
1.5 Bringing Order to Chaos 13
1.6 On Designing Complex Systems 14
Introduction: The Structure of Complex systems, The Inherent Complexity of Software, Attributes of Complex System, Organized and Disorganized Complexity, Bringing Order to Chaos, Designing Complex Systems
Text Input / Output: Files, Streams, Standard Library Input / Output Functions, Formatting Input / Output Functions, Character Input / Output Functions, Binary Input / Output: Text versus Binary Streams, Standard Library, Functions for Files, Converting File Type
Repetition: Concept of Loop, Pretest and Post-test Loops, Initialization and Updating, Event and Counter Controlled Loops, Loops in C, Other Statements Related to Looping, Looping Applications
Embracing GenAI - A Strategic ImperativePeter Windle
Artificial Intelligence (AI) technologies such as Generative AI, Image Generators and Large Language Models have had a dramatic impact on teaching, learning and assessment over the past 18 months. The most immediate threat AI posed was to Academic Integrity with Higher Education Institutes (HEIs) focusing their efforts on combating the use of GenAI in assessment. Guidelines were developed for staff and students, policies put in place too. Innovative educators have forged paths in the use of Generative AI for teaching, learning and assessments leading to pockets of transformation springing up across HEIs, often with little or no top-down guidance, support or direction.
This Gasta posits a strategic approach to integrating AI into HEIs to prepare staff, students and the curriculum for an evolving world and workplace. We will highlight the advantages of working with these technologies beyond the realm of teaching, learning and assessment by considering prompt engineering skills, industry impact, curriculum changes, and the need for staff upskilling. In contrast, not engaging strategically with Generative AI poses risks, including falling behind peers, missed opportunities and failing to ensure our graduates remain employable. The rapid evolution of AI technologies necessitates a proactive and strategic approach if we are to remain relevant.
Unit 8 - Information and Communication Technology (Paper I).pdfThiyagu K
This slides describes the basic concepts of ICT, basics of Email, Emerging Technology and Digital Initiatives in Education. This presentations aligns with the UGC Paper I syllabus.
How to Make a Field invisible in Odoo 17Celine George
It is possible to hide or invisible some fields in odoo. Commonly using “invisible” attribute in the field definition to invisible the fields. This slide will show how to make a field invisible in odoo 17.
Safalta Digital marketing institute in Noida, provide complete applications that encompass a huge range of virtual advertising and marketing additives, which includes search engine optimization, virtual communication advertising, pay-per-click on marketing, content material advertising, internet analytics, and greater. These university courses are designed for students who possess a comprehensive understanding of virtual marketing strategies and attributes.Safalta Digital Marketing Institute in Noida is a first choice for young individuals or students who are looking to start their careers in the field of digital advertising. The institute gives specialized courses designed and certification.
for beginners, providing thorough training in areas such as SEO, digital communication marketing, and PPC training in Noida. After finishing the program, students receive the certifications recognised by top different universitie, setting a strong foundation for a successful career in digital marketing.
The French Revolution, which began in 1789, was a period of radical social and political upheaval in France. It marked the decline of absolute monarchies, the rise of secular and democratic republics, and the eventual rise of Napoleon Bonaparte. This revolutionary period is crucial in understanding the transition from feudalism to modernity in Europe.
For more information, visit-www.vavaclasses.com
2024.06.01 Introducing a competency framework for languag learning materials ...Sandy Millin
http://sandymillin.wordpress.com/iateflwebinar2024
Published classroom materials form the basis of syllabuses, drive teacher professional development, and have a potentially huge influence on learners, teachers and education systems. All teachers also create their own materials, whether a few sentences on a blackboard, a highly-structured fully-realised online course, or anything in between. Despite this, the knowledge and skills needed to create effective language learning materials are rarely part of teacher training, and are mostly learnt by trial and error.
Knowledge and skills frameworks, generally called competency frameworks, for ELT teachers, trainers and managers have existed for a few years now. However, until I created one for my MA dissertation, there wasn’t one drawing together what we need to know and do to be able to effectively produce language learning materials.
This webinar will introduce you to my framework, highlighting the key competencies I identified from my research. It will also show how anybody involved in language teaching (any language, not just English!), teacher training, managing schools or developing language learning materials can benefit from using the framework.
A Strategic Approach: GenAI in EducationPeter Windle
Artificial Intelligence (AI) technologies such as Generative AI, Image Generators and Large Language Models have had a dramatic impact on teaching, learning and assessment over the past 18 months. The most immediate threat AI posed was to Academic Integrity with Higher Education Institutes (HEIs) focusing their efforts on combating the use of GenAI in assessment. Guidelines were developed for staff and students, policies put in place too. Innovative educators have forged paths in the use of Generative AI for teaching, learning and assessments leading to pockets of transformation springing up across HEIs, often with little or no top-down guidance, support or direction.
This Gasta posits a strategic approach to integrating AI into HEIs to prepare staff, students and the curriculum for an evolving world and workplace. We will highlight the advantages of working with these technologies beyond the realm of teaching, learning and assessment by considering prompt engineering skills, industry impact, curriculum changes, and the need for staff upskilling. In contrast, not engaging strategically with Generative AI poses risks, including falling behind peers, missed opportunities and failing to ensure our graduates remain employable. The rapid evolution of AI technologies necessitates a proactive and strategic approach if we are to remain relevant.
Group Presentation 2 Economics.Ariana Buscigliopptx
Strings part2
1. @2020 Presented By Y. N. D. Aravind 1
Presented By
Y. N. D. ARAVIND
M.Tech, Dept of CSE
Newton’s Group Of Institutions, Macherla
2. Session Objectives
Explain C Strings
Explain String Input / Output Functions
Explain Arrays of Strings
Explain String Concepts
@2020 Presented By Y. N. D. Aravind
2
Explain Strings Manipulation Functions
2
3. Arrays of Strings
To create an array of strings, you use a two dimensional character array, in
which the size of the left index determines the number of strings and the
size of the right index specify the maximum length of each string.
Syntax : char str[4][20];
In the above example an array of 4 strings, with each string having a
maximum length of 20 characters, those are str[0], str[1], str[2],str[3].
@2020 Presented By Y. N. D. Aravind
3
#include <stdio.h>
void main()
{
char names[10][20];
int n,i;
printf(“n How many names ”);
scanf(“%d”,&n);
flushall();
for(i=0;i<n;i++)
{
printf(“n Enter name %d ”,i);
gets(names[i]);
}
3
printf(“n The names are n”);
for(i=0;i<n;i++)
{
puts(names[i]);
}
}
Output
How many names 3
Enter name 1 NGI
Enter name 2 NIST
Enter name 3 NIE
The names are
NGI
NIST
NIE
4. String Functions
C does not provide any operator to deal with strings. However, C does
have a large set of useful string handling library functions. The
corresponding header file is string.h
@2020 Presented By Y. N. D. Aravind
1. strcpy( destination string, source string ): To copy source string to destination string.
2. strcat(string1, string2 ): To append string2 at end of string1(include null char )
3. strlen( string ): Returns length of the strings( no of characters )
4. strcmp( string1, string2 ): To compare two strings and returns 0(zero) if they are equal
otherwise returns a non-zero number.
5. strchr(string,char): Locate the first occurrence of a char in a string.
6. strrev( string ): Reverse of the string.
7. strncpy( string1,string2,n): To copy n chars from string2 to string1. After copy we must place a null
char at end of string1.
8. strncat( string1, string2, n): To append n chars of string2 at end of string1. After append we must
place a null char at end of string1.
9. strcmpi(string1,string2) : Same as strcmp( ), but at the time of compare it will ignore the case
sensitive.
10. strncmp( string1, string2, n): Same as strcmp( ), but it will compare first n specified chars only.
11. strncmpi( string1, string2, n): Same as strcmpi( ), but it will compare first n specified chars only.
12. strset( s1,s2): Returns the string s1 at the first occurrence of a sub string s2.
4
5. strcpy( )
This function is used to copy one string to the other. Its syntax is as follows:
strcpy(string1,string2);
where string1 and string2 are one-dimensional character arrays.
This function copies the content of string2 to string1.
@2020 Presented By Y. N. D. Aravind
#include<stdio.h>
#include<conio.h>
Void main ()
{
char string1[30],string2[30];
printf(“n Enter first string : ”);
gets(string1);
printf(“n Enter second string:”);
gets(string2);
strcpy(string1,string2);
printf(“n First string = %s”,string1);
printf(“n Second string =
%s”,string2);
}
5
OUTPUT
Enter first string : master
Enter second string : madam
First string = madam
Second string = madam
6. strcat ( )
This function is used to concatenate two strings. i.e., it appends one string at the end of the
specified string. Its syntax as follows :
strcat(string1,string2);
where string1 and string2 are one-dimensional character arrays.
This function joins two strings together. In other words, it adds the string2 to string1 and the
string1 contains the final concatenated string. E.g., string1 contains prog and string2 contains ram,
then string1 holds program after execution of the strcat() function.
@2020 Presented By Y. N. D. Aravind
#include<stdio.h>
#include<conio.h>
Void main()
{
char string1[30],string2[30];
printf(“n Enter first string : ”);
gets(string1);
printf(“n Enter second string:”);
gets(string2);
strcat(string1,string2);
printf(“n First string = %s”,string1);
printf(“n Second string = %s”,string2);
}
6
OUTPUT
Enter first string : prog
Enter second string : ram
First string = program
Second string = ram
7. strncat( )
In the previous slide we discussed strcat() function, which is used for concatenation of one string
to another string. In this guide, we will see a similar function strncat(), which is same as strcat()
except that strncat() appends only the specified number of characters to the destination string.
Syntax:- char *strncat(char *str1, const char *str2, size_t n);
str1 – Destination string.
str2 – Source string which is appended at the end of destination string str1.
n – number of characters of source string str2 that needs to be appended.
@2020 Presented By Y. N. D. Aravind 7
#include <stdio.h>
#include <string.h>
int main ()
{
char str1[50], str2[50];
//destination string strcpy(str1, "This is my initial string");
//source string strcpy(str2, ", add this");
//displaying destination string printf("String after concatenation: %sn", strncat(str1, str2, 5));
// this should be same as return value of strncat() printf("Destination String str1: %s", str1);
return 0;
} OUTPUT
String after concatenation: This is my initial string, add
Destination String str1: This is my initial string, add
8. strlen( )
This function is used to find the length of the string excluding the NULL character. In other words,
this function is used to count the number of characters in a string. Its syntax is as follows:
int strlen(string);
Example: char str1[ ] = “WELCOME”;
int n;
n = strlen(str1);
@2020 Presented By Y. N. D. Aravind
#include<stdio.h>
#include<conio.h>
Void main()
{
char string1[50];
int length;
printf(“n Enter any string : ”);
gets(string1);
length=strlen(string1);
printf(“n The length of string = %d”,length);
}
8
OUTPUT
Enter any string : WELCOME
The length of string = 7
9. strcmp ( )
This function compares two strings character by character (ASCII comparison) and returns one of
three values {-1,0,1}. The numeric difference is „0‟ if strings are equal .If it is negative string1 is
alphabetically above string2 .If it is positive string2 is alphabetically above string1.
Its syntax is as follows : int strcmp(string1,string2);
Example : char str1[ ] = “ROM”;
char str2[ ] =”RAM”;
strcmp(str1,str2); (or) strcmp(“ROM”,”RAM”);
@2020 Presented By Y. N. D. Aravind
#include<stdio.h>
#include<conio.h>
Void main()
{
char string1[30],string2[15];
int x;
printf(“n Enter first string:”);
gets(string1);
printf(“n Enter second string:”);
gets(string2);
x=strcmp(string1,string2);
if(x==0)
printf(“n Both strings are equal”);
else if(x>0)
printf(“n First string is bigger”);
else
printf(“n Second string is bigger”);
}
9
OUTPUT
Enter first string : ROM
Enter second string : RAM
First string is bigger
10. strncmp ( )
In the last tutorial we discussed strcmp() function which is used for comparing
two strings. In this guide, we will discuss strncmp() function which is same as
strcmp(), except that strncmp() comparison is limited to the number of
characters specified during the function call. For example strncmp(str1, str2, 4)
would compare only the first four characters of strings str1 and str2.
Syntax:-
int strncmp(const char *str1, const char *str2, size_t n)
str1 – First String
str2 – Second String
n – number of characters that needs to be compared.
Return value of strncmp()
This function compares only the first n (specified number of) characters of
strings and returns following value based on the comparison.
0, if both the strings str1 and str2 are equal
>0, if the ASCII value of first unmatched character of str1 is greater than str2
<0, if the ASCII value of first unmatched character of str1 is less than str2
@2020 Presented By Y. N. D. Aravind 10
11. strrev ( )
The function can be used to reverse a string.
Syntax:- strrev(str);
@2020 Presented By Y. N. D. Aravind
#include<stdio.h>
#include<conio.h>
Void main
{
char str1[10];
printf(“n enter string”);
gets(str);
strrev(str);
puts(“The reverse string of a given string is ”);
puts(str);
}
11
OUTPUT
Enter string : COLLEGE
The reverse string of a given string is EGELLOC
12. strchar( )
The function strchr() searches the occurrence of a specified character in the given string and
returns the pointer to it.
Syntax :-
char *strchr(const char *str, int ch)str – The string in which the character is searched.
ch – The character that is searched in the string str.
Return Value of strchr()
It returns the pointer to the first occurrence of the character in the given string, which means that if
we display the string value of the pointer then it should display the part of the input string starting
from the first occurrence of the specified character.
@2020 Presented By Y. N. D. Aravind
#include <stdio.h>
#include <string.h>
int main ()
{
const char str[] = "This is just a String";
const char ch = 'u';
char *p;
p = strchr(str, ch);
printf("String starting from %c is: %s", ch, p);
return 0;
}
12
Output
String starting from u is: ust a String
13. Write a program to print whether the string is palindrome or not.
@2020 Presented By Y. N. D. Aravind
#include <stdio.h>
#include <string.h>
int main ()
{
char str[10],str1[10];
int x;
printf(“n Enter string ”);
gets(str);
strcpy(str1,str)
strrev(str);
x=strcmp(str,str1);
if(x==0)
{
printf(“n %s is palindrome”,str);
}
else
{
printf(“n %s is not palindrome”,str);
}
}
13
Output -1
Enter string liril
liril is palindrome
Output -2
Enter string newton
newton is not palindrome
14. Thank You
@2020 Presented By Y. N. D. Aravind
Presented By
Y. N. D. ARAVIND
M.Tech, Dept of CSE
Newton’s Group Of Institutions, Macherla
14