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
program for factorial

Problem: (a) What is the main advantage to using a data file? (b) What is meant by opening a data file? How is this accomplished? Illustrate your answer clearly with a sui

#Write 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 two points can

How to use HTTP Headers inside PHP? Write the statement through which it can be added? HTTP headers can be used in PHP by redirection that is written as: Headers can be

Rule: To determine the canonical form we should OR the min terms. A min term is defined as a Boolean equation of the input if the output is logic '1'. If the input is logic '1'

Ask question #Minimum 100 words accepted program for polishing jewels#


Question 1 Explain the following Object Oriented Concepts with suitable examples for each Question 2 Explain the following Object Oriented Methodologies Question 3 Descr

write a program in c/C++ using nested if statement for calculating the average marks and grades of 5 subjects

A body which has three forces acting on it is in equilibrium. One force is 3N to the North and the other is 4N to the west. What us the magnitude and direction of the third force?