World Top Softwares
Login Please

Join the forum, it's quick and easy

World Top Softwares
Login Please
World Top Softwares
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Search
 
 

Display results as :
 


Rechercher Advanced Search

Log in

I forgot my password

Latest topics
» Practically as cut-price as files
10th program EmptyMon Aug 01, 2011 11:44 pm by Guest

» Netbook Brands
10th program EmptyMon Aug 01, 2011 5:39 am by Guest

» backlinks checker backlink service
10th program EmptySun Jul 31, 2011 8:56 am by Guest

» how to buy facebook fans f4
10th program EmptySat Jul 30, 2011 2:34 pm by Guest

» Alle bijzondere dingen in de zaanstreek
10th program EmptySat Jul 30, 2011 8:11 am by Guest

» HERE YOU CAN POST ALL WEBSITE LINKS...
10th program EmptyWed Aug 26, 2009 2:16 pm by onesimpletech

» cool web site for all must check it
10th program EmptyMon Jul 06, 2009 2:32 pm by Snopy Cobra

» poetry spirit
10th program EmptyMon Jul 06, 2009 2:31 pm by Snopy Cobra

» best to learn VC++
10th program EmptySun May 10, 2009 3:22 pm by Guest

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search
Statistics
We have 30 registered users
The newest registered user is deigavr

Our users have posted a total of 191 messages in 126 subjects
Who is online?
In total there are 2 users online :: 0 Registered, 0 Hidden and 2 Guests

None

[ View the whole list ]


Most users ever online was 125 on Wed Apr 07, 2021 9:18 am
RSS feeds


Yahoo! 
MSN 
AOL 
Netvibes 
Bloglines 



10th program

Go down

10th program Empty 10th program

Post by Snopy Cobra Sun Jan 04, 2009 7:43 pm

Objective

Study the function of String.

Theory

“A string is a contiguous sequence of symbols or values, such as a character string (a sequence of characters) or a binary digit string (a sequence of binary values).”

Strings are the form of data used in programming languages for storing and manipulating text String is generally understood as a data type storing a sequence of data values, usually bytes, in which elements stand for characters. A variable declared to have a string data type usually causes storage to be allocated in memory that is capable of holding some predetermined number of symbols.


Task

Write a program that inputs a character as lower case covert it into uppercase and vice versa.

Coding:
#include<stdio.h>
#include<string.h>
void main(void)
{
char st[20];
int i;
printf("Enter string\n");
scanf("%s",st);
for(i=0;i<=strlen(st);i++)
{ if(st[i]>=65&&st[i]<=90)
st[i]=st[i]+32; }
printf("\nString in uppercase to lowercase is\n %s",st);
}
Snopy Cobra
Snopy Cobra
Admin
Admin

Number of posts : 99
Age : 34
Location : Bahria University Karachi
Reputation : 0
Registration date : 2008-07-31

https://telecompk.forumotion.com

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum