You are on page 1of 1

Department of Computer Science & Engineering

Motilal Nehru National Institute of Technology,Allahabad


Class Assignment
Subject: Computer Programming Class: B.Tech(2nd Semester,2010-2011)
INSTRUCTIONS:
All students of group B1,B2 & B3 are advised to solve this assignment.

(Problems Based on Command Line Argument)

1. WAP to read a string of decimal digits from command line and convert it to its decimal
value using a function atoi().
2. WAP to read a string of hexadecimal digits from the command line and convert it to its
decimal value using a function htoi().
3. WAP to read a set of words from the command line and sort it using Selection Sort.
4. WAP to read a set of sorted words from the command line and search for a word entered
by the user using Binary Search.
5. WAP to read a string of binary digits from the command line and convert it to following:
Decimal,Octal and Hexadecimal.
6. WAP to read a string of hexadecimal digits from the command line and convert it to its
Binary and Decimal.
7. WAP to print the all those command line strings that contains apattern entered by the
user.
8. WAP to search for a character entered by the user in the command line argument strings.
9. WAP to print all the command line arguments along with their length.
10. WAP to read a set of integers from the command line and store them in a dynamically
allocated array of integers. Finally sort the integer using Insertion Sort and display the
result.
11. WAP to read a set of string from the command line and store them in a dynamically
allocated 2-D character array.Allocate only the required spaces.Finally display the each
string using putchar() function.
12. WAP to read two strings from the command line and display only those characters of the
second string which are not in the first string.

Prepared By
Vinay Vishwas
Faculty
Department of Computer Science & Engineering
Motilal Nehru National Institute of Technology,Allahabad

You might also like