Submitted Questions

  • Notepad Testing

    Question:Below is Notepad's File/Save dialog.a) If you were asked to test this dialog, how would you go about it?b) List various inputs you might place into the "File name" text field to test it.

    nealgen

    • Mar 26th, 2011

    Test the functionality of the dialog boxes with both positive and negative test cases.like saving the file name with standard file names, negative testing with special characters, blank spaces etc.Te...

  • Function to find Occurrences

    Write a function Occurrences() in a language of your choice that takes in two strings. The first is a search string, and the second is a sentence. For example, running the function:Running Occurrences ("o", "Red Gate Software - Ingeniously Simple Tools")will output: Occurrences of 'o': 4Occurrences ("at", "The cat sat on the mat")will output: Occurrences of 'at': 3charles.

    shashank

    • Nov 3rd, 2011

    Code
    1. void occ(char *x,char *y)
    2. {
    3.  char *a;
    4.  int r=0;
    5.  
    6.  while(a=strstr(y,x))
    7. {
    8.   r+=1;
    9.   y=a+1;
    10. }
    11. return r;
    12. }
    13.  
    14. void main()
    15. {
    16.  printf("occurances = %d",occ("at","the cat sat on the mat"));
    17. }