C program to print character array, C/C++ Programming

Program to print character array:

Write a program to print the character array by using string class functions.

void main()

{  char line[30];

  int i=0;

 

clrscr();

printf("enter the line\n");

//scanf("%[^\n]",line);

scanf("%s",line);

 for(i=0;i<=strlen(line)-1;i++)

{

 line[i] =(int)line[i]-32;

}

printf("%s",line);

getch();

}

Posted Date: 10/19/2012 2:55:29 AM | Location : United States







Related Discussions:- C program to print character array, Assignment Help, Ask Question on C program to print character array, Get Answer, Expert's Help, C program to print character array Discussions

Write discussion on C program to print character array
Your posts are moderated
Related Questions
plaese tell the full program for the above given topic with the input and output

In this problem you are given a board in which some of the elements are placed as shown in diagram below. Each element represents a color. Fill the other elements in the board, suc

3. Write a program to encrypt and decrypt strings of characters using the following ciphers: a) Caesar cipher b) Vigenere cipher c) Matrix transposition cipher Your program shoul

Write a function for finding out highest and lowest marks obtained by a student from an array contained student name and marks. For Example : GetHighestLowestMarks{Student{n}, Ma


Write a program consisting of two functions (plus main). The first function should read in a number and then pass this back to main. This value should then be passed into a secon

how to declare arrays

#question. write a program number to alphabet in c++..

Define some features of external storage class in c program? The features of an external storage class variable are as follows: Storage - memory Default initial value -

Smugglers are becoming very smart day by day. Now they have developed a new technique of sending their messages from one smuggler to another. In their new technology, they are send