Question
1 - WAP to replace each string of one or more blanks by a single blank Description: Input string: Pointers are sharp knives. Output String:
1 - WAP to replace each string of one or more blanks by a single blank
Description:
Input string:
Pointers are sharp knives.
Output String:
Pointers are sharp knives.
Blank can be spaces or tabs. (replace with single space).
Pr-requisites:-
Functions
Pointers
Objective: -
To understand the concept of
Functions, Arrays, and Pointers
Inputs: -
String with multi-spaces between words
Sample execution: - Test Case 1: Enter the string with more spaces in between two words Pointers are sharp knives. Pointers are sharp knives. Test Case 2: Enter the string with more spaces in between two words Welcome to Emertxe
Welcome to Emertxe
Test Case 1: Enter the string with more spaces in between two words Welcome to Emertxe
Welcome to Emertxe
requested file
#include
void replace_blank(char []);
int main() { char str[50]; printf("Enter the string with more spaces in between two words "); scanf("%[^ ]", str); replace_blank(str); printf("%s ", str); }
2.
2 - WAP to check given string is Pangram or not
Description:
Read a string from the user. Check whether the string is Pangram or not
A pangram is a sentence containing every letter in the English Alphabet.
Example 1 : "The quick brown fox jumps over the lazy dog is a Pangram [Contains all the characters from a to z]
Example 2: The quick brown fox jumps over the dog is not a Pangram [Doesnt contain all the characters from a to z, as l, z, y are missing]
Pre-requisites:
Strings
Functions
Pointers
Input:
Read a string from the user(use selective scanf)
Output:
Print whether the string is Pangram or not
Sample Execution:
Test Case 1:
Enter the string: The quick brown fox jumps over the lazy dog
The Entered String is a Pangram String
Test Case 2:
Enter the string: The quick brown fox jumps over the dog
The Entered String is not a Pangram String
requested file
#include
int pangram(char []);
int main() { }
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started