473,411 Members | 1,998 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,411 software developers and data experts.

How can i save my word in character:

means
int i=o; so how i save in my answer in character
char h=yes; but this is errore:

For example:scanf("%d",&h);but this is urer writing is save:
tell me any way:plz


Plz Tell me

Attached Images
File Type: jpg untitled.jpg (43.7 KB, 292 views)
Dec 19 '13 #1
1 1282
donbock
2,426 Expert 2GB
A char variable can only hold a single character, not a string like "yes". You can store a string in a char array.

scanf("%d",&i) stores a number in int variable i. However, you declared i as a char, so treating it as an int will cause a run-time problem.

if (i==h) You can use == to compare integer values but you cannot use it to compare strings. Use library function strcmp instead. However, don't do that unless both arguments are strings -- they are currently both integers.
Dec 19 '13 #2

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

Similar topics

0
by: Steve Holland | last post by:
Hi, We have a web app which reads in a Word 2000 template (.dot), replaces some fields, then saves it off to the filesystem. This all works fine. What we would now like to do is to save the...
4
by: bborden | last post by:
When I save a document in Word that I have transferred from VBA to Word I notice that the "Save As" file name is for, instance, "December 4.doc". Since the date is the first field I print on the...
0
by: COMantilles | last post by:
Hi, Hi created a simple function to open a word doc on server then save it to HTML, ok for the result except that i would like to save it to "filtered" HTML without office's tags (word 2002...
1
by: kmercer46 | last post by:
i need to open an existing word document from my asp.net page, i used the code Response.contenttype="appliaction/msword" i opens the document in the IE, when i made changes to that document in...
1
by: Alan T | last post by:
I want to open a blank Word document. Once the user click the save button, it will be saved to a specific directory. How can I do that?
5
by: JohnSouth | last post by:
Hi I've seen lots of posts around this subject but nothing recent or very helpful. I've an ASP.Net c# application that needs to read Word documents from a directory on the web server, open...
1
by: =?Utf-8?B?QmFkaXM=?= | last post by:
Hi, I'm using the bellow code to mail merge a word document and it's working fine, where I'm openning "improvement.doc" which is just word document that contain with some text and the merge...
2
by: cgd | last post by:
how to do Save Word document to Database in memory, not through the disk
1
by: aliatef | last post by:
hi i have created application using gembox i create a word file and save data on it but i want after saving it itis opened to me using microsoft word directly it is the code ...
1
by: kamlesh21630 | last post by:
Hi All, I wanted to save my word file into text format using macro in word 2007. Below snippet code for saving doc into text but we in below code we are giving path and i wanted to run this...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.