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
Explain Processing A Data File? Mainly data file applications needs that a data file be altered as it is being processed. For instance in an application involving the processin

A string S is said to be "Super ASCII", if it contains the character frequency equal to their ascii values. String will contain only lower case alphabets (''a''-''z'') and the asci

pseudo code that will determine if the number is prime or composite

a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b. The area under a curve between tw

Most first graders know that nine hundred and ninety nine plus one is one thousand, but C++ doesn't! Sure, a computer can easily compute 999 + 1 and get 1000. But reading and writi

Program for Swapping the Two Integers                 For example, Swapping the two value                                 int x=4,y=6,t;                                 t

i need to do my home work

Write a program to get the largest element in an array using Function? # include int largest(int b[],int); main() { int lar,a[5]={12,2,36,40,5}; lar=largest(a,n); printf("

For this program you will add and test 2 new member functions to the IntSLList class posted on the website. The two member functions are: insertByPosn(int el, int pos) Assuming t

(a) Write a recursive procedure (digits n) that computes the number of digits in the integer n using a linear recursive process. For example, (digits 42) should return 2 and (digit