5 like 0 dislike

#include <stdio.h>

#include <string.h>

int main()

{

char str[5];

str[0] = 't'; str[1] = 'e'; str[2] = 's'; str[3] = 't';

if(strcmp(str, "test") == 0)

printf("One\n");

else

printf("Two\n");

return 0;

}

 

References: C From Theory

[Normal] Essay (Open question) - asked in Introduction to Computer Programming I (C) by (20.9k points)
Available when: Unlimited - Due to: Unlimited

edited by | 21 views
0 0
Nice question

1 Answer

0 like 0 dislike
Hidden content!
5
answered
Get it on Google Play Welcome to Peer-Interaction Programming Learning System (PIPLS) LTLab, National DongHwa University
English 中文 Tiếng Việt
IP:162.158.79.137
©2016-2019

Related questions

5 like 0 dislike
0 answers
[Normal] Essay (Open question) - asked Feb 19, 2017 in Introduction to Computer Programming I (C) by The Contributor (20.9k points)
Available when: Unlimited - Due to: Unlimited
| 17 views
5 like 0 dislike
0 answers
[Normal] Essay (Open question) - asked Feb 19, 2017 in Introduction to Computer Programming I (C) by The Contributor (20.9k points)
Available when: Unlimited - Due to: Unlimited
| 28 views
5 like 0 dislike
0 answers
[Normal] Essay (Open question) - asked Feb 19, 2017 in Introduction to Computer Programming I (C) by The Contributor (20.9k points)
Available when: Unlimited - Due to: Unlimited
| 12 views
5 like 0 dislike
1 answer
[Normal] Essay (Open question) - asked Feb 19, 2017 in Introduction to Computer Programming I (C) by The Contributor (20.9k points)
Available when: Unlimited - Due to: Unlimited
| 32 views
5 like 0 dislike
0 answers
[Normal] Essay (Open question) - asked Feb 19, 2017 in Introduction to Computer Programming I (C) by The Contributor (20.9k points)
Available when: Unlimited - Due to: Unlimited
| 35 views
9,223 questions
85,527 answers
63,418 comments
2,693 users