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
Convert a COV/CPE (Micosoft Fax Cover Page) file to a TIF image file Project Description: I would like a small API written that will take a COV/CPE file and replaced the corr

switch statement




WAP TO ACCEPT THE BASIC SALARY OF EMPLOYEES & CALCULATE NET SALARY   #include stdio.h> #include conio.h>   void main() {                    float Basi

Op e r a t o r O v e r l o a d i n g : W h e n   a n   o p e r a t o r   i s   u s e d   f o r   d i ff e r e n t   op e r a

Write a function that calculates the number of elapsed days between two dates. For example the days between Feb 3, 1970 and June 21, 1980? Becareful for the Leap year.

A palindrome is a string that reads the same from both the ends. Given a string S convert it to a palindrome by doing character replacement. Your task is to convert S to palindrome

Project Description: I will need a tutor that would help me out in Data Structure and learning Algorithm more at the mathematical/algorithmic level. The book is written by "by T