Computer Science, asked by sanjithmohanraj16, 4 months ago

Urgent please

Find the output for the given program.

Attachments:

Answers

Answered by peeyush321kumar
0

Answer:

for the first one:

1

2

3

4

5

6

Explanation:

Answered by anindyaadhikari13
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