#include <stdio.h>
#include <string.h>

void proba(char *test)
	int i;
	char det = *test;
	printf("%s", det);


int main(void)

	char datar[] = "asds";

	printf("%d \n", datar);


	return 0;

printf("%s", det);

is the problem. When its turn to execute its trowing me out from the app. With "wrong address"

Recommended Answers

Change char det = *test; to char *det = test;

Jump to Post

All 4 Replies

det is a single char. You're trying to make it a string, and it can never be a string, since it has no room for an end of string char '\0' to go on the end of it.

if i make it %d its giving me the address, but i need it to print it as a text !!

Change char det = *test; to char *det = test;

yes i saw my mistake :) tnx anyway :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.