Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Need hellp for these two functions /** * SQ is an \"incompletely specified type.

ID: 3673014 • Letter: N

Question

Need hellp for these two functions

/**
* SQ is an "incompletely specified type."
*
* The definition of struct service_queue must
* be (hidden) in an implementation .c file.
*
* This has two consequences:
*
*   - Different implementations are free to
*      specify the structure as suits
*       their approach.
*
*   - "client" code can only have pointers
*       to service_queue structures (type
*       SQ *). More importantly, it cannot
*       de-reference the pointers. This
*       lets us enforce one of the principles
*       of ADTs: the only operations that
*       can be performed on a service queue
*       are those specified in the interface
*       -- i.e., the functions specified below.
*/
typedef struct service_queue SQ;

/**
* Function: sq_create()
* Description: creates and intializes an empty service queue.
*    It is returned as an SQ pointer.
*
* RUNTIME REQUIREMENT: O(1)
*/
extern SQ * sq_create();

/**
* Function: sq_free()
* Description: deallocates all memory assciated
* with service queue given by q.
*
* RUNTIME REQUIREMENT: O(N_b) where N_b is the number of buzzer
*   IDs that have been used during the lifetime of the
*   service queue; in general, at any particular instant
*   the actual queue length may be less than N_b.
*
*   [See discussion of "re-using buzzers" below]
*
*/
void sq_free(SQ *q);

Explanation / Answer

down vote accepted

How about this?

and then use:

down vote accepted

How about this?

  CREATE FUNCTION dbo.StripWWWandCom (@input VARCHAR(250))  RETURNS VARCHAR(250)  AS BEGIN      DECLARE @Work VARCHAR(250)        SET @Work = @Input        SET @Work = REPLACE(@Work, 'www.', '')      SET @Work = REPLACE(@Work, '.com', '')        RETURN @work  END  

and then use:

  SELECT ID, dbo.StripWWWandCom (WebsiteName)  FROM dbo.YourTable .....  
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote