
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN: 9780133594140
Author: James Kurose, Keith Ross
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Question
I have 1 program that I need help with in C
Program 1= (Strings starting with "Th"), write a program that reads a series of strings and prints only those beginning with the letters "Th".
This is the only program I need help with right now, please help me with the answers, They are required in C langauge and plese make sure they work on the online complier of microsoft visual studio.
I did this and i got an error
the char starting with Th couldnt show
![+
في علامة تبويب جديدة
X GDB online Debugger | Compiler
x Answered: e 1 program that I ne
O Lab11 - Bb Collaborate
OClass Work + HW:ll Ja Bb
onlinegdb.com A
Run
O Debug
I Stop
E Share
A Save
{} Beautify
Language c
OnlineGDB beta
main.c
online compiler and debugger for c/c++
1
2 #include <stdio.h>
code. compile. run. debug. share.
3 #include<string.h>
4
IDE
5- int main() I
My Projects
char name[100][100];
printf("Enter series of strings:");
for(int i=0;i<5;i++)
scanf("%s",&name[i]);
// read string
printf("string that starts with Th:- \n");
for(int i=0;i<5;i++)
{
if(name[i][®]=='T' && name[i][1]=='h')
//comparing the first character of string with 'T' and second character of string with 'h',if both are true then the string is printed
printf("%s\n",name[i]);
// display string
}
return 0;
7
Classroom new
8
Learn Programming
9
10
Programming Questions
11
Sign Up
12
13
Login
14
15
+ 121K
16
17
18
19
20 }|
input
main.c:8:17: warning: format '%s' expects argument of type 'char
but argument 2 has type
'char (*)[100]' [-Wformat=]
8 |
scanf ("%s", &name [i]);
char (*) [100]
char
Enter series of strings:thor
them
thememe
ice
venom
string that starts with Th:-
...Program finished with exit code 0
Press ENTER to exit console.O
About • FAQ • Blog • Terms of Use • Contact Us • GDB Tutorial •
Credits • Privacy
© 2016 - 2021 GDB Online
ENG E
العنوان
1.](https://content.bartleby.com/qna-images/question/b066b577-aabb-4d6a-8370-37433ae1271f/09a26f42-da69-46fe-99af-573619a1a08d/uc19u7h_thumbnail.png)
Transcribed Image Text:+
في علامة تبويب جديدة
X GDB online Debugger | Compiler
x Answered: e 1 program that I ne
O Lab11 - Bb Collaborate
OClass Work + HW:ll Ja Bb
onlinegdb.com A
Run
O Debug
I Stop
E Share
A Save
{} Beautify
Language c
OnlineGDB beta
main.c
online compiler and debugger for c/c++
1
2 #include <stdio.h>
code. compile. run. debug. share.
3 #include<string.h>
4
IDE
5- int main() I
My Projects
char name[100][100];
printf("Enter series of strings:");
for(int i=0;i<5;i++)
scanf("%s",&name[i]);
// read string
printf("string that starts with Th:- \n");
for(int i=0;i<5;i++)
{
if(name[i][®]=='T' && name[i][1]=='h')
//comparing the first character of string with 'T' and second character of string with 'h',if both are true then the string is printed
printf("%s\n",name[i]);
// display string
}
return 0;
7
Classroom new
8
Learn Programming
9
10
Programming Questions
11
Sign Up
12
13
Login
14
15
+ 121K
16
17
18
19
20 }|
input
main.c:8:17: warning: format '%s' expects argument of type 'char
but argument 2 has type
'char (*)[100]' [-Wformat=]
8 |
scanf ("%s", &name [i]);
char (*) [100]
char
Enter series of strings:thor
them
thememe
ice
venom
string that starts with Th:-
...Program finished with exit code 0
Press ENTER to exit console.O
About • FAQ • Blog • Terms of Use • Contact Us • GDB Tutorial •
Credits • Privacy
© 2016 - 2021 GDB Online
ENG E
العنوان
1.
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by stepSolved in 2 steps with 2 images

Knowledge Booster
Similar questions
- Use C language to write your program. Show your code in a picture with commentsarrow_forwardI need help making this program in C programming. Please look at the pictures provided at that helps. Thank You!arrow_forwardWhat is the purpose of looping in C#? Name the two main categories of the loops and their respective examples. Which is the fastest loop among all? Just name it.arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Computer Networking: A Top-Down Approach (7th Edi...Computer EngineeringISBN:9780133594140Author:James Kurose, Keith RossPublisher:PEARSONComputer Organization and Design MIPS Edition, Fi...Computer EngineeringISBN:9780124077263Author:David A. Patterson, John L. HennessyPublisher:Elsevier ScienceNetwork+ Guide to Networks (MindTap Course List)Computer EngineeringISBN:9781337569330Author:Jill West, Tamara Dean, Jean AndrewsPublisher:Cengage Learning
- Concepts of Database ManagementComputer EngineeringISBN:9781337093422Author:Joy L. Starks, Philip J. Pratt, Mary Z. LastPublisher:Cengage LearningPrelude to ProgrammingComputer EngineeringISBN:9780133750423Author:VENIT, StewartPublisher:Pearson EducationSc Business Data Communications and Networking, T...Computer EngineeringISBN:9781119368830Author:FITZGERALDPublisher:WILEY

Computer Networking: A Top-Down Approach (7th Edi...
Computer Engineering
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:PEARSON

Computer Organization and Design MIPS Edition, Fi...
Computer Engineering
ISBN:9780124077263
Author:David A. Patterson, John L. Hennessy
Publisher:Elsevier Science

Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:9781337569330
Author:Jill West, Tamara Dean, Jean Andrews
Publisher:Cengage Learning

Concepts of Database Management
Computer Engineering
ISBN:9781337093422
Author:Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:Cengage Learning

Prelude to Programming
Computer Engineering
ISBN:9780133750423
Author:VENIT, Stewart
Publisher:Pearson Education

Sc Business Data Communications and Networking, T...
Computer Engineering
ISBN:9781119368830
Author:FITZGERALD
Publisher:WILEY