Em Andamento

strcat(), strcpy(), strlen()

Purpose of Quiz/Lab #8

This quiz/lab activity is to demonstrate string manipulation in C and prepare you for the mid-term exam, so you can see what you will be asked to do on the exam in order to prepare for it.

REQUIRED Practice Problems:

Write the following functions, consistent with the prototypes shown:

.

1) int strlen(char* s);

Given a string, return the number of characters in the string, NOT INCLUDING the null at the end.

.

2) char* strcpy(char* s1, char* s2);

The function will copy the string s2 into the string s1. Note the function returns the address of the string.

.

3) char* strcat(char* s1, char* s2);

The function concatenates the string s2 into the end of string s1. If s1 is "Hello " and s2 is "World" before, after calling strcat, s1 will be "Hello World"

Lab Assignment #8

LAB Assignment:

Write main() functions to test and debug each function, using gets() and puts() for string input and output as follows:

.

A) To demonstrate strlen(), input your first name using gets() and use printf to print the string followed by the number of characters in the string. An input of "Yousef" would print 3. Show this with 3 string input examples.

.

B) To demonstrate strcpy(), input your first name using gets(s1) and use strcpy() to copy it to a second string, s2 and print both strings with puts(). So an input of "Yousef" would print: "string1 = Yousef string2 = Yousef".

.

C) To demonstrate strcat(), use gets() to input your first name, last name, and Red ID as three separate strings, print them out, one per line, concatenate the three strings, and then use puts() to print out Hello followed by your name and Red ID. If the three input strings entered are "Yousef" "AlKhatrash" and "817218071", then it should print:

.

Yousef

AlKhatrash

817218071

Hello Yousef AlKhatrash 817218071

Habilidades: Programação C

Ver mais: strings programming, string problems, programming practice problems, programming practice, printf programming, practice programming problems, first lab, programming string functions, programming strcpy, programming quiz, programming printf, programming hello world, programming char, char programming, lab test, concatenate, number manipulation, hello world null, string manipulation, programming lab, lab test programming, programming lab test, s1, line exam, copy exam

Acerca do Empregador:
( 3 comentários ) San Diego, United States

ID do Projeto: #6779349

Premiar a:

vano101

Hello. I am C and C++ expert I would be able to solve it in hour or two ............................

$15 USD em 1 dia
(418 Avaliações)
6.5

17 freelancers estão ofertando em média $25 para este trabalho

kaloyan13

Hello, I am very good in C and can write your functions for 2-3 hours. Thanks.......................

$30 USD em 1 dia
(73 Comentários)
5.5
nauman187

hi, i can help. please reply. thanks .

$18 USD em 1 dia
(20 Comentários)
4.2
urmate

HI Contact me for an efficient, perfect, well documented development of your project according to 100% accuracy and requirements, with dedicated support. Thanks Farah Saif

$19 USD em 1 dia
(30 Comentários)
4.2
TarasKuzyo

Hi! I have good exprience in C programming. I can deliver you 100% correct results infast time.

$25 USD em 1 dia
(15 Comentários)
4.0
macfij7

Hi, This is a nice assignment which i'd like to do. I like this stuff and I am good with it. I can start working ASAP. Regards, Maciek

$25 USD em 1 dia
(1 Comentário)
1.8
shahidost

Hi i can easily done your project.I have three years of C/C++ experience. You consider it done from my side with accuracy and in complete form. Thanks.

$20 USD em 1 dia
(0 Comentários)
0.0
EamonnMcEvoy

A proposal has not yet been provided

$25 USD em 1 dia
(0 Comentários)
0.0
devwebacro

hello, i'm student at computer science eng,i have done a lot of project in c language ( linked lists , binary trees... ) , it's my first time as net freelancer , and i wish that you give me this opportunity. -- kind r Mais

$20 USD em 1 dia
(0 Comentários)
0.0
ramincorp

Hello, We are C program expets, you can see our profile. We will be able to create your C program and give you a quality code. Please contact us for more details.

$111 USD em 1 dia
(0 Comentários)
0.0
gutimac

8 years of experience in C. Now working in C/C++ compiler of Borland I will do this API as optimized as possible, no memory leaks and the results checked with valgrind.

$10 USD em 1 dia
(0 Comentários)
0.0
avdheshsingla

I am good in c and c++ programing so i think i can do it. As i am working professional so i will be needing an extra day to complete the work.

$20 USD in 2 dias
(0 Comentários)
0.0
Yas0

Its really Child play for me, i am having 5 years experience in Embedded systems, I am a little bit beginner in freelance field that s the reason i am currently doing the small projects like this

$20 USD em 1 dia
(0 Comentários)
0.0
MihaelaSbr

Hi, I can help you with your lab assignments. Contact me for more details. Have a nice day, Mihaela

$10 USD in 2 dias
(0 Comentários)
0.0
maoo92

I study computer science in college. Can help u get the job done. Studied C for 8 years. Look forward to hear from you on chat.

$20 USD em 1 dia
(0 Comentários)
0.0
UmerTahir1

I can do it, I know the way around strings and its functions. would just need a little time to do this.

$15 USD em 1 dia
(0 Comentários)
0.0
c4551u5

A proposal has not yet been provided

$25 USD em 1 dia
(0 Comentários)
0.0