Turn Desktop View Off
by Dinesh Thakur Category: C Programming (Pratical)

Let us use character arrays fname, mname and lname to store the first name, middle name and last name of a person. The program given below first accepts the full name, i. e., values of fname, mname and lname using a scanf function. Then the name is printed in the desired abbreviated form using a printf function. The initial letters of fname and mname are printed using fname [0]and mname[0], respectively. The program is given below.

 
by Dinesh Thakur Category: C Programming (Pratical)

Let us use variable meters of type float to represent length in meters and variables feet and inches of type int and float, respectively, to represent length in the FPS system. Let us also use variable tot_inches of type float to represent the given length in inches. To convert the length in meters to the FPS system, we first determine tot_inches, i. e., given length in inches as

 
by Dinesh Thakur Category: C Programming (Pratical)

A character is an uppercase letter if its value in the range 'A' to ' Z ' (both inclusive). The program segment given below tests whether a given character is an uppercase letter or not.

 
by Dinesh Thakur Category: C Programming (Pratical)

An alphanumeric character is one that is either an uppercase or lowercase letter or a digit. The statement given below tests whether character ch is an alphanumeric character or not.

 

Page 1 of 9



About Dinesh Thakur

Dinesh ThakurDinesh Thakur holds an B.SC (Computer Science), MCSE, MCDBA, CCNA, CCNP, A+, SCJP certifications. Dinesh authors the hugely popular blog. Where he writes how-to guides around Computer fundamental , computer software, Computer programming, and web apps. For any type of query or something that you think is missing, please feel free to Contact us.