# STAY HOME # STAY SAFE
#include<stdio.h>
// main function
int main()
{
int i,j,total;
// run loop for i from 1 to 61 with increment of 10
for(i=1;i<=61;i=i+10)
{
printf("\n");
// run loop of j from 0 to 6
for(j=0;j<=6;j++)
{
// add i and j
total=i+j;
// display result
printf("%5d",total);
}
}
getchar();
return 0;
}
what is output #include<stdio.h> pint main() { int i, j, total; for ( 2 { printf("\n");...
#include<stdio.h> eint main() { int i = 0, j = 0; while (i < 10|| j < 7) { i++; j++; } printf("%d, %d\n", i, j); getchar(); return 0; } 01,01 10,10 7.7 10,7
include<stdio.h> #include<pthread.h> int i=4 ,j=10; void*childfunc(void *p) { printf("child here.i=%d,j=%d\n",i,j); i*=3; j*=3; printf("child here.i=%d,j=%d\n",i,j); } void main() { pthread_t child1; pthread_create(&child, Null,childfunc, Null) pthread_join(child,Null); printf("parent here.i=%d,j=%d\n",i,j); i*=2; j*=2; printf("end of program .i=%d,j=%d\n",i,j); } what is output?
#include<stdio.h> int main() { int data[10], i, j, temp; printf("Enter 10 random number to sort in ascending order:\n"); for(i = 0; i < 10; i++) scanf("%d", &data[i]); /* Sorting process start */ ****** INSERT YOUR CODE TO COMPLETE THE PROGRAM ****** printf("After sort\n"); for(i = 0; i < 10; i++) printf("%d\n",data[i]); return 0; } Looking for alternative solutions for the program code.
Debug to print output "2 3 5 6 8 11": #include <stdio.h> #include <stdlib.h> int main() { int i, j, n; int A[] = {2, 3, 5, 5, 5, 6, 8, 11, 11, 11}; n = sizeof(A) / sizeof(int); for (i = 0; i < n - 1; i++){ if (A[i] != A[i + 1]) { for (j = 1; j < n - 1; j++) { A[j]...
Question 3 Predict the output of the following C program: #include <stdio.h> void main() { int i = 0; for(; 1; i++){ printf("%d",i); if(i==7) break; } 12pt Paragraph 1 Β Ι Ο Αν και Ta
can u please solve it in c++ format,,,, general format which is #include<stdio.h> .......printf and scanf format dont worry about the answers i have down Q3, What is the output of the program shown below and explain why. #include #include <stdio.h> <string.h> int main(void) ( char str[ 39764 int N strlen(str) int nunj for (int i-0; i t Nǐ.de+ printf(") num (str[] 'e); I/ digits range in the ASCII code is 48-57 if (nue > e) f 9 printf( Xdin,...
#include "stdio.h" int main() { float array[5][3],rowsum=0.0,colsum=0.0; int i,j; for(i=0;i<5;i++){ printf("Enter the %d elements of array:\n",i); for(j=0;j<3;j++){ scanf("%f",&array[i][j]); } } printf("Given table data:\n"); for(i=0;i<5;i++){ for(j=0;j<3;j++){ printf(" %0.1f",array[i][j]); } printf("\n"); } for(i=0;i<5;i++){ for(j=0;j<3;j++){ rowsum=rowsum+array[i][j]; } printf("sum of the %d row is %0.1f\n",i,rowsum); rowsum=0; } for(j=0;j<3;j++){ colsum+=array[j][i]; printf("Sum of %d coloumn is %0.1f\n",j,colsum); colsum=0; } return(0); } can someone help me to get the correct row sum and column sum in c program
#include<stdio.h> sint main() { int k, j, count = 0; for (k = -1; k <= 5; k++) { 1; j--) for (j 4; j >= count++; } printf("count=%d", count); getchar(); return 0; بها count =28 count -21 couunt =28 count =15
what is the output of the following program? #include<stdio.h> #include<string.h> int main(void){ char word[20]; int i =0 strcpy(word, "ORGANISE"); while(word[i] !='\0'){ if(i%2 ==1) word[i] = 'C'; i++; } printf("%s",word); return 0; }
What is the output? #include <sys/types.h> #include <sys/wait.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> int main() { int x = 5; int y = 2; int z = 30; x = fork(); y = fork(); if (x != 0) printf("Type 1\n"); if (y != 0) printf("Type 2\n"); z = fork(); if (x > 0 || y > 0 || z > 0) printf("Type 3\n"); if (x == 0 && y == 0 && z != 0) printf("Type 4\n"); if (x...