6. Write a program that (i) declares a string str_a (of size (LAST_FOUR_DIGITS_OF_YOUR_STUDENT_ID % 11 + 30)) and initializes with "Your own name, Your own student id". (ii) Take input from user into str_a. This string may have alphabets and digits. (iii) Store only the numerical characters of str_a into another string str_b. (iv) If the string str_b doesn't contain any numerical character, print 0 (zero), otherwise, print str_b. Some example input/outputs are given below: Example 1 123 Example 2 abc Example 3 123abc Example 4 12ab34 Input Output 123 123 1234

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

name sayem ahmed 
id 011211030 
please do it in C 

6.
Write
that
(i)
declares
string
str_a
(of
size
a
program
a
(LAST_FOUR_DIGITS_OF_YOUR_STUDENT_ID % 11 + 30)) and initializes with "Your own
name, Your own student id". (ii) Take input from user into str_a. This string may have
alphabets and digits. (iii) Store only the numerical characters of str_a into another string str_b.
(iv) If the string str_b doesn't contain any numerical character, print 0 (zero), otherwise, print
str_b. Some example input/outputs are given below:
Example 1
Example 2
Example 3
Example 4
Input
Output
123
abc
123abc
12ab34
123
123
1234
Transcribed Image Text:6. Write that (i) declares string str_a (of size a program a (LAST_FOUR_DIGITS_OF_YOUR_STUDENT_ID % 11 + 30)) and initializes with "Your own name, Your own student id". (ii) Take input from user into str_a. This string may have alphabets and digits. (iii) Store only the numerical characters of str_a into another string str_b. (iv) If the string str_b doesn't contain any numerical character, print 0 (zero), otherwise, print str_b. Some example input/outputs are given below: Example 1 Example 2 Example 3 Example 4 Input Output 123 abc 123abc 12ab34 123 123 1234
Expert Solution
steps

Step by step

Solved in 4 steps with 5 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education