Write a program in ‘C’ to find the length of a given string including blank spaces, tabs and other special symbols use “Pointers” concept. 10m Dec2005

By | June 11, 2014

Write a program in ‘C’ to find the length of a given string including blank spaces, tabs and other special symbols (new line character should be taken as a string terminating character)
Note : You should use “Pointers” concept. 10m Dec2005

 

Use

while(str[i] != “\n”) 

instead of

while(*str)

 

Solved program can be found on this link http://cssimplified.com/c-programming/a-c-program-with-a-function-that-will-return-the-length-of-a-character-string-without-using-inbuilt-function

 

 

Write macros for the following: 5m Dec2005

To find the maximum of two numbers A, B where A and B are arguments of a macro

 

Solved program can be found on this link http://cssimplified.com/c-programming/a-c-program-that-uses-macros-min-max-to-find-and-return-respectively-the-minimum-maximum-of-two-values

Leave a Reply