Tags » Chapter 1 » Page 2

WAP detab that replaces the tab in the input with the proper number of blanks to space to the next tab stop. Assume a fixed number of tab stops, say n columns. Should n be variable or symbolic parameter?

//header section
#include
#include

//Define section
#define TABINC 4 /* tab stop columns */

//Global Declaration

using namespace std; //so that we dont have to specify std:: always… 139 more words

Dennis M Ritchie

WAP to reverse each input string. write a function for reversing the string

//Header section
#include
#include
#include

//define section
#define MAXLEN 50

using namespace std; //declared because we dont have to always use std::

//Global declaration
int GetLine(char *); 116 more words

Dennis M Ritchie

WAP to remove the trailing blanks and tabs from each line of input and remove entirely blank lines.

//Header section
#include
#include
#include

//define section
#define MAXLEN 50

using namespace std; //declared because we dont have to always use std::

//Global declaration
int GetLine(char *); 94 more words

Dennis M Ritchie

WAP to find out the input lines whose length is greater than 40.

//Header section
#include
#include
#include

//define section
#define MAXLEN 50
#define CONDLEN 40

using namespace std; //declared because we dont have to always use std:: 88 more words

Dennis M Ritchie

WAP to find out the longest input line and also print its length.

//Header section
#include
#include
#include

//define section
#define MAXLEN 50

using namespace std; //declared because we dont have to always use std::

//Global declaration
int GetLine(char *); 111 more words

Dennis M Ritchie