Pages

Monday, November 21, 2016

Questions based on String in C programming

  • What do you mean by a string in C program?
  • Give the use of ‘\0’ in a C String program.
  • List in-built string processing functions of C language.
  • State the use of strlen() function in C program.
  • Explain use of strcmp() function with suitable example.
  • Give the difference between strcpy( ) and strcmp( ) function.
  • Which in-built string function can be used for Searching inside a given string?
  • Show use of any three functions to read a character from user.
  • Write logic to find length of given string without using any in-built string function.
  • Can we perform arithmetic processing on a character in C program?
  • Write logic to copy string 1 into string 2 without using any in-built string function.

  • Predict the output of following loop:
     for( i=’A’; i < ‘Z’; i++)
         printf(“%c”, i);

  • Predict the output of following loop:
     for( i='0'; i<='9'; i++)
         printf("%d ", i);


More String related questions will be posted soon……


* * * * *

No comments:

Post a Comment