Create a class that contains a normal member function and a


Need help on these few questions: Answer the questions and label the answers in the format a) answer. Code that is needed to answer the questions is below the questions Thanks in advance

a) Create a class that contains a normal member function and a static member function.

b) Create an object of that class and, inside a for loop, call both functions multiple times.

c) Compile the program and see if you can check the assembler to see where the arguments are being passed and verify that this pointer is only passed in one situation.

// word5.h

#ifndef _WORD5_H

#define _WORD5_H

class Word {

private:

char *buf;

static int wordCount; public:

Word(char *s);

int getCount(); };

#endif

// word5.cpp

#include

#include "word5.h"

int Word::wordCount = 0;

Word::Word(char *s) { buf = strdup(s);

wordCount++; }

int Word::getCount() {

return wordCount; }

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Create a class that contains a normal member function and a
Reference No:- TGS02872339

Expected delivery within 24 Hours