Answer:
java: error
C: false
Explanation:
In Java the compiler understand that you are trying to compare an integer (15) with a boolean (10 > 5) this generate the next error:
error: bad operand types for binary operator
In C the compiler convert (15 > 10 > 5) in (15>10) > (10>5) which is equal to TRUE > TRUE, the compiler can also read it as 1 > 1 (since 1 is TRUE and 0 is FALSE). like 1>1 is false then C program return false.
You can place an insertion point by clicking in the field or by clicking F2 keyboard shortcut. Insertion point is usually characterized by a blinking vertical line that allows you to insert a next character that you wanted.
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:
Grace sat quietly in a stinky stadium with her blue jacket
Grace jumped on a plane to Paris.
Grace ate bananas, apples, and guavas quietly while she listened to the news.
Grace is the name of a major character in my favorite novel
Grace was looking so beautiful as she walked to the podium majestically.
Grace looked on angrily at the blue-faced policeman who blocked her way.