0% found this document useful (0 votes)
35 views4 pages

Assignment On String Part-1 (Dynamically)

This document provides 11 programming assignments involving string manipulation in C using dynamic memory allocation. The assignments include accepting a string from the user with multiple spaces and printing it with a single space delimiter, counting the characters and vowels/consonants in a string, reversing a string, replacing spaces with other characters, determining the number of words in a string, replacing substrings, and printing Fibonacci series up to character codes.
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)
35 views4 pages

Assignment On String Part-1 (Dynamically)

This document provides 11 programming assignments involving string manipulation in C using dynamic memory allocation. The assignments include accepting a string from the user with multiple spaces and printing it with a single space delimiter, counting the characters and vowels/consonants in a string, reversing a string, replacing spaces with other characters, determining the number of words in a string, replacing substrings, and printing Fibonacci series up to character codes.
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
You are on page 1/ 4

C : Assignment on String(Dynamically) Typing is no substitute for thinking

C Language

Assignment on String Part-1


(Using Dynamic Memory Allocation)

TECHNORBIT INFOSYSTEMS Amol Rahane : 9545535857


C : Assignment on String Typing is no substitute for thinking

1. Write a C program to accept string with multiple spaces from user and print as it

is.(Using Dynamic memory allocation)

2. Write a C program to accept string with multiple spaces from user and print it with a

single space as a delimiter.(Using Dynamic memory allocation)

Eg:

Input String:

a. India is_my country

Output String:

India_is_my_country (Consider _ as space)

3. Write a C program to print count number of characters in given string. (Using

Dynamic memory allocation)

4. Write a C program to accept string and print it in the reverse order. (Using Dynamic

memory allocation)

Eg:

Input String: India is my country

Output String: yrtnuoc ym si aidnI

5. Write a C program to count number of vowels and number of consonants in the

given string. (Using Dynamic memory allocation)

TECHNORBIT INFOSYSTEMS Amol Rahane : 9545535857


C : Assignment on String Typing is no substitute for thinking

6. Write a C program to reverse a given string as below. (Using Dynamic memory

allocation)

Eg:

Input String: India is my country

Output String: aidnI si ym yrtnuoc

7. Write a C program to replace space with ‘$’ in given string. (Using Dynamic memory

allocation)

Eg:

Input String: India is my country

Output String: India$is$my$coutry

8. Write a program which accept sentence from user and print number of words from

that sentence. (Using Dynamic memory allocation)

Input String: India_is_my_country

Output: 4

Input String:

a. India is my country (Consider _ as space)

Output: 4

TECHNORBIT INFOSYSTEMS Amol Rahane : 9545535857


C : Assignment on String Typing is no substitute for thinking

9. Write a C program to replace Good names in mail. (Using Dynamic memory allocation)

Eg:

Raw String: Hello GoodName

Input String: India

Output String: Hello India

Input String: Sangamner

Output String: Hello Sangamner

Input String: technOrbit

Output String: Hello technOrbit

10. Write a C program to print all Fibonacci series up to each ASCII code of alphabets in

given string. (Using Dynamic memory allocation)

11. Write a C program which accepts a string from user which contains a characters

from ‘b’ to ‘y’. (Using Dynamic memory allocation)

Eg:

Input String: mn jn kn kazfd

Output String: mn jn kn k

TECHNORBIT INFOSYSTEMS Amol Rahane : 9545535857

You might also like