I know that there are things on the internet but nothing seems to be helping right now. I am simply trying to reverse this string uses pointers and no strlen or reverse functions from the string...
Type: Posts; User: eater
I know that there are things on the internet but nothing seems to be helping right now. I am simply trying to reverse this string uses pointers and no strlen or reverse functions from the string...
u mean like into separate functions and calls?
#include<stdio.h>
int main(void)
{
char b[6];
int z[6];
int i = 0;
int a= 1;
int binary;
I understand that you would have to do it like that but see, I am converting a characters to integers of binary and I need it to be able to read the binary numbers as a sequence of integers...
if I have a for loop like this:
for (i = 0; i < 6; i++)
{
z[i] = a[i]-48;
scanf("%d", z[i]);
}
printf("%d", z);
Here is the code that I have been trying to work with. I dunno, this should be really simple because all I want to do is take in a string (100110) and convert the string then to integers that look...
Ok so I don't think I was as clear as I would have liked. Thanks for the help though. I think the point was that we don't use the atoi function because I thought of that as well. Here is the actual...
So I need to write some code to take in a 6 bit binary "integer" that is actually a string of characters and I need to convert it into in an binary integer so that I can perform further functions on...
Alright guys I got it. Thanks a ton for the help.
I dont understand what I would put as the returning value inside of a[] for the second one though?
That worked but now it prints half my numbers in the out file and half in the terminal?
Hey guys I need my program to write the sorted array into an output file in addition to printing it. It prints just fine but it returns an empty output file. What am I missing? I know this is...
I actually got it early....really early this morning. I was actually able to return both a MAX and MIN value from the same function as I initially tried to do. The only problem with my code stood...
dbzx ur in my class aren't you? do you know how to do this?
ugh I have been trying to figure this out for far too long. is there anyone who knows how I should fix this?
Well I thought it did so I changed my code to look like this but it doesnt output correctly. Did I change my code correctively. I believe my main function was already designated to a return an...
Hey guys so disregard everything I have done previosly I have made some serious headway on my program at the cost of my sleep and/or health. haha. So at this point the entire program should run...
k so I set multiply = to 1 and I added an address operator but its still giving me a bus error? thanks for your patience/
#include<stdio.h>
#define COL 6
#define ROW 4
int mult(int...
I'm sorry, which variable has not already been initialized vart? And I tried taking the address of ma[i][j] but it still returns a bus error
The second code compiles without errors but there is a bus error. What should I do? And will this perform the correct operation?
Actually I think this code will probably be better and more simple:
#include<stdio.h>
#include<stdlib.h>
#define COL 6
#define ROW 4
int mult(int ma[][6]);
Hey everyone,
I am creating a program that opens a file that contains a 4 x 6 matrix and then stores it in a two dimensional array. It then prompts the user to enter a number which the program...