void COMPUTE(int N) { int i, sum = 0; printf("Proper divisors are: "); for (i = 1; i < N; i++) { if (N % i == 0) { if (i >...
void Display_With_Spaces(long num) { long weight = 1; while (num / weight > 9) { weight *= 10; } while (weight > 0) {...
int i; int size = A.size(); // given that A and B have equal size for (i = 0; i < size; i++) { C.push_back(A.at(i));...
Use CODE tags to mark source code and use tabulators. Here's correct code with marked elements to fix. #include<stdio.h> int main(){ int...
Fix your 'missing vowels disorder' first.
1. Correct definitonint y,x=4; 2. Assignment instruction must be in a functionint main() { y=x; // other instructions return 0; }...
Array as a function parameter is passed by its pointer.element_type my_array[ARRAY_SIZE]; // array definition void fun(element_type *array) //...
Nobody will do your homework for you, but here are some tips and sample code: 1. Create a structure representing an item with required...
#include <stdio.h> #include <string.h> #define countryNo 5 #define maxLength 100 void sortNames(char country[countryNo][maxLength]) {...
int n = 10; int *ipt = &n; *ipt += 2; printf("%d", n);
Was it a message on the compiler's console or just an info at line where #include is (yellow underline)? Maybe both? Look up for this file in...
BT_MAX_RX_BUF_SIZE is a macro defined in ecrobot_bluetooth.h header file - include it, just like I showed you in the previous post.
Compiler is warning you that you are passing pointer to signed value when pointer to unsigned value is needed (or vice versa). You probably...
The program will stop, but when you put cout into while loop, it works much slower, because it has to display data on the screen (it this case...
bool compareArrays(int *arrayA, int *arrayB, int arraySize) { int i; for (i = 0; i < arraySize; i++) { if (arrayA[i] !=...
d is a table of pointers to int, so d=&c;
void whatToDo(int day, int raining) { // day: Monday = 1 .. Sunday = 7 // raining: No = 0 , Yes = 1 if (day <= 5) {...
int add(int taxi_array[], int front, int rear, int max, int addedTaxi)else if (front==-1)
1) Pointer to a function. Function parameter type: array of pointers to char. Function return type: int. 2) Function prototype. Function...
void checkAndSwap(int *array, int j, int value) { int done = 0; if (array[j] > value) { array[j + 1] = array[j]; if (--j < 0) {...
Separate names with a comma.