0% found this document useful (0 votes)
58 views2 pages

Coal Lab 5: (Bcs-F17-Aft)

The document contains instructions for 4 tasks related to a Coal Lab assignment in C programming. Task 1 asks students to write a program that prompts the user to enter a number and prints a pattern. Task 2 prompts for a string and prints its length. Task 3 reverses a string input by the user. Task 4 converts a binary number to hexadecimal. Students are instructed to complete the tasks in order without discussion and validate their input.

Uploaded by

ANJUM KHAN
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
58 views2 pages

Coal Lab 5: (Bcs-F17-Aft)

The document contains instructions for 4 tasks related to a Coal Lab assignment in C programming. Task 1 asks students to write a program that prompts the user to enter a number and prints a pattern. Task 2 prompts for a string and prints its length. Task 3 reverses a string input by the user. Task 4 converts a binary number to hexadecimal. Students are instructed to complete the tasks in order without discussion and validate their input.

Uploaded by

ANJUM KHAN
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Instructor: Yasin Nasir Thursday, October 11,2018

Coal Lab 5
(BCS-F17-AFt)

Instructions:
 Attempt all tasks in the given order.
 Discussion with each other is not allowed.
 Must Validate your input

Task 1: Write a program that prompts the user to enter a number, and
print following pattern on screen. Follow Sample Execution
Sample execution:
Enter A Number: 5

Task 2: Write a program that prompts the user to enter string and print
the length of string on next line
Sample execution:
Type a String: BCSF17 AFTERNOON
Length of String is: 16
Instructor: Yasin Nasir Thursday, October 11,2018

Task 3: Write a program that prompts the user to enter string and print
that string in reverse order by using loop.
Sample execution:
Type a String: BCSF17 AFTERNOON
Reversed String is: NOONRETFA 71FSCB

Task 4: Write a program that prompts the user to enter a Binary


number of 16 digits or less, and output it in Hex on next line.
Sample Execution:
Type a Binary Number upto 16 digits: 11100001
In Hex it is: E1

You might also like