/* project_0.h Project 0: This is the header file declaring the prototypes of several functions you are to write for this exercise. Please do not modify this file when you submit your work. */ #ifndef PROJECT_0_H #define PROJECT_0_H /* Function 1 : int numbit (int val) This function will analyze the bit representation of an integer (val >=0) and report the number of set bits (bit is 1). For example, if execute: cout<=0) passed in is 2's power or not. If you cannot write one line of code, use as less line as possible. For example, if excecute: if (is2power(8)) {...} this expression should evaluates to be true. */ bool is2power(int val); /* Function 3 : void urlmanip (char * &url) In HTTP transfer protocol, a URL is transmitted back to sever to request the webpage. The URL string is the string you typed into the Address box in your Internet Explorer. There is a possibility that this string will be separated by multiple spaces ' '. However, in order to send out an URL, the URL should contain no space. A standard approach is to replace every single space by "%20". For example, if a original URL looks like: http://www.cs. cc ny . cuny. e d u The resulting string should be: http://www.cs.%20cc%20ny%20.%20cuny.%20e%20d%20u A string reference is passed in this function and you should modify this string in space so that url will become the modified string with space been replaced by "%20". Please pay attention to the running time of your function. */ void urlmanip (char * &url); /* Function 4: Node merge_list (Node na, Node nb); This function asks you to write an efficient method to merge two sorted linked lists. Preferrably, the running time is O(n). The function takes in two pointers to the sorted linked lists. You should implement a method to merge them together and return a pointer to the merged linked list. For example: If you have 2 lists: 1->3->5->7->9 and 2->4->6->8 After merging, the resulting list should be: 1->2->3->4->5->6->7->8 */ typedef struct tagNode { int _val; struct tagNode *next; } NODE_DATA, * NODE; NODE merge_list (NODE na, NODE nb); #endif /* end of definition of PROJECT_0_H */