473,395 Members | 2,010 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

i want answer in embedded c i using embedded studio (nordic semiconductor)

print the given number with spaces in between each number?


void stringwhitesp(char *string, char *whitesp)
{
char c='0';

for (c=0; *(string+c)<='\0';c++)
{
*(whitesp + (c*2)) = *(string + c);
*(whitesp + (c*2) + 1) = ' ';
}
*(whitesp + (c*2)) = 0;
}

/**@brief Function for application main entry.
*/


//char string[MAX_SIZE];
char * pointer;
char num[] = {10,1,50,30,3,8,62,15,15,4};

char one[20];

int main(void)
{
bool erase_bonds;



// Initialize.

log_init();
timers_init();

// Start execution.

stringwhitesp(num, one);


NRF_LOG_INFO("num %d\n",NRF_LOG_PUSH (num));
NRF_LOG_INFO("one %s\n",NRF_LOG_PUSH (one));


// Enter main loop.


for(;;)
{
idle_state_handle();
}




}
Sep 16 '20 #1
1 1960
dev7060
636 Expert 512MB
What's the error?

I believe *(string+c)<='\0' should be *(string+c)!='\0'. Plus c should be of int type.
Sep 16 '20 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Whoever | last post by:
To create Excel file, you can Add Reference Visual Studio.NET, browse to ... and then select Microsoft.Office.Interop.Excel, etc. It endsup some reference to GUID in project file. You can then...
3
by: Kieran Kelly | last post by:
Is it possible to create a new Web Application Project using Visual Studio.Net 2003 on Windows 2003 Server but no in the Default Web Site. 1. I have created a new Web Site in IIS called WebSite2...
10
by: Frankie | last post by:
I am looking for tutorials, articles, etc that can help to enlighten me on what's "really going on" or what's required to create a .NET application (particularly Windows Forms) WITHOUT the use of...
0
by: meetsri2003 | last post by:
Hi all ! I was using unixodbc for connecting to ms sql server on linux it is working fine,but now i want to check ms sql server compatible embedded sql c library on linux. what is ms sql server...
2
by: Geek | last post by:
Guys, I have a question regarding publishing web site using visual studio 2005. As usual I am running in to issues using visual studio 2005. I have build a web site and when I publish to the...
0
by: Sean | last post by:
When I try to debug using visual Studio 2005 I get the following error
0
by: Dutt | last post by:
AMD x86/x64 and Multi Core using Visual Studio 2008 http://msdotnetsupport.blogspot.com/2008/01/amd-x86x64-multi-core-visual-studio.html
0
by: =?Utf-8?B?S2luZXRpYyBKdW1wIEFwcGxpZmUgZm9yIC5ORVQg | last post by:
Refactor .NET code using Visual Studio and Refactor! Pro Modifying the existing source code without changing its functionality is called refactoring of Source Code. Visual Studio gives us a lots of...
1
by: saikat bose | last post by:
We create our c# dll file using the visual studio 2010. So first from file menu select the project option, then select the class library,named it as you wish after cliking ok by default a...
0
xarzu
by: xarzu | last post by:
Debugging a Web Site using Visual Studio I am studying a web site that caught my eye by making a test site privately. Since the original html and CSS and JavaScript code is on a Windows Server and...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.