<em>A</em><em> </em><em> </em><em>WAn</em><em> </em><em>(</em><em> </em><em>Wide</em><em> </em><em>Area</em><em> </em><em>Network</em><em> </em><em>)</em><em> </em><em>is</em><em> </em><em>made</em><em> </em><em>up</em><em> </em><em>of</em><em> </em><em>LANS</em><em> </em><em>(</em><em> </em><em>Local</em><em> </em><em>Area</em><em> </em><em>Network</em><em>)</em><em>…</em><em>…</em><em>…</em><em>…</em>
Answer:
Check the explanation
Explanation:
#define _MULTI_THREADED
#include <pthread.h>
#include <stdio.h>
#include <errno.h>
#define THREADS 2
int i=1,j,k,l;
int argcG;
char *argvG[1000];
void *threadfunc(void *parm)
{
int *num;
num=(int*)parm;
while(1)
{
if(i>=argcG)
break;
if(*num ==1)
if(argvG[i][0]=='a' ||argvG[i][0]=='2'||argvG[i][0]=='i' ||argvG[i][0]=='o' ||argvG[i][0]=='u')
{
printf("%s\n",argvG[i]);
i++;
continue;
}
if(*num ==2)
if(!(argvG[i][0]=='a' ||argvG[i][0]=='2'||argvG[i][0]=='i' ||argvG[i][0]=='o' ||argvG[i][0]=='u'))
{
printf("%s\n",argvG[i]);
i++;
continue;
}
sched_yield();
}
return NULL;
}
int main(int argc, char *argv[])
{
pthread_t threadid[THREADS];
int rc=0;
int loop=0;
int arr[2]={1,2};
argcG=argc;
for(rc=0;rc<argc;rc++)
argvG[rc]=argv[rc];
printf("Creating %d threads\n", THREADS);
for (loop=0; loop<THREADS; ++loop) {
rc =pthread_create(&threadid[loop], NULL, threadfunc,&arr[loop]);
}
for (loop=0; loop<THREADS; ++loop) {
rc = pthread_join(threadid[loop], NULL);
}
printf("Main completed\n");
return 0;
}
The below attached image is a sample output
Answer:
What does Bob [1] return?
What about Bob[-2]?
What about Bob[1:-1]?
How to get the length of Bob?
Explanation:
Answer:
90%
Explanation:
90%
ELO 4.2 A department requires access to the database application from Monday to Friday, 9AM to 5 PM. Last Thursday at 1 PM, the application crashed, and it took six hours to fix the problem. What was the availability of the application during the week?
Answer:
It is a C++ program. The complete function ConvertToDecadesAndYears which takes totalYears as parameter and convert totalYears to decades and years is provided in the attached document.
Explanation:
The explanation is provided in the attached document.
The screenshot of the complete code along with its output is attached.