Urgent please
Find the output for the given program.
Attachments:
Answers
Answered by
0
Answer:
for the first one:
1
2
3
4
5
6
Explanation:
Answered by
2
Required Answer:-
Question 1:
Given CØde:
int i=1;
while(i<7) {
printf("\n %d",i);
i++;
}
Output:
//new line.
1
2
3
4
5
6
Explanation:
- The given loop iterates until the value of i is less than 7.
- It displays a new line and then prints the value of i.
- After displaying the value of i, it's value is incremented by 1.
- I have mentioned - // new line so that you can understand that a new line is there.
Question 2:
Given CØde:
#include <stdio.h>
void main() {
char str[15];
int len;
printf("\n Enter the string:");
gets(str);
len=strlen(str);
strrev(str);
puts(str);
printf("\nString Length = %d",len);
}
Output:
Error.
As string.h header file is not included in it.
Similar questions
Math,
1 month ago
Chemistry,
1 month ago
Science,
1 month ago
Computer Science,
4 months ago
Science,
4 months ago
India Languages,
10 months ago
India Languages,
10 months ago