5 like 0 dislike
346 views

#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)
ID: 21977 - Available when: Unlimited - Due to: Unlimited

edited by | 346 views
0 0
Nice question

1 Answer

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

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)
ID: 21975 - Available when: Unlimited - Due to: Unlimited
| 255 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)
ID: 21978 - Available when: Unlimited - Due to: Unlimited
| 259 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)
ID: 21976 - Available when: Unlimited - Due to: Unlimited
| 262 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)
ID: 21973 - Available when: Unlimited - Due to: Unlimited
| 325 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)
ID: 21972 - Available when: Unlimited - Due to: Unlimited
| 261 views
12,783 questions
183,443 answers
172,219 comments
4,824 users