the array you provided takes up extra space in your RAM
so, the concept of malloc is used. malloc dosent increase space but takes the extra space to the hard disk. it will execute the program in...
Type: Posts; User: coolshyam
the array you provided takes up extra space in your RAM
so, the concept of malloc is used. malloc dosent increase space but takes the extra space to the hard disk. it will execute the program in...
int a[10] = { [4] = 1, [7] = 1 };
well well well well. the [4]=1 here refers to a[4]=1
and [7]=1 refers to a[7]=1.so they are one. but i couldnt understand how the remaining elements, a[0],...
the array is returned only after you identify the space bar next to a name . so, modify the progam in the following line
char actors[] = "Kate Winslet, Johnny Depp, Morgan Freeman, Tom Hanks, ";
so what if it is 16 years old
we are discussing logic behind programs dear.it dosent matter if it is 16 years old or 1 day old. c programming needs C that's it. but i do agree that there will be...
u can use puts
u can use putc
u can use putchar
u can use assembly code asm
u can define your own printf
e.g. #define yourname printf
u can write to the VDU yourself
you opened the file in the if statement. this should not be done becaus the null point assignment takes place only in the next line of comparision. you will be clear after you see my code below....
dude.its all done.hope it works on Dev C++
#include <stdio.h>
#include<dos.h>
int main(void) /*wait for keypress*/
{
float weight, value;
char beep;
create a file named user.txt in temp directory
i have given you an example in which only the username is taken into account
remaing work is your effort
int main()
{
FILE *fp;
char...
a*b%c+3
in this apply the BOMDAS rule
that is bracket
of
multiply
divide
add
substract
hello everybody. the program below uses the kbhit to get a character from the key board.
when i tried to execute the program in Visual C++, the output showed press any key to continue.after pressing...
i have seen the usage of isspace function.thats nice.
but you can use the ascii value of space instead.the ascii value of space is 10 i suppose.so
while(input[i]!=\0)
{
...
hi there
you can use two methods for this
1. as our dear friend notified, use
strcpy(tname,name);
else
sorry didnt notice what the user wanted. actually i forgot.so, i used w+ mode.
fp=fopen(argv[1],"r");
when you take the name of the file from the user,it is better to use arguements.
for example,
int main(int argc, char *argv[])
{
FILE *fp;
fp=fopen(argv[1],"w+");
...
yes i do realize that most of you buddies use dev C++. but i dont own a computer. i use my college computer and the admin dosent allow me to download devc++. no probs.i shall not use getch() any...
frankly speaking, i have learnt a lot in C through this site because of all of you.i have a small clarification
look at my code below
#include<stdio.h>
#include<conio.h>...
all the possible libraries use the following method to compare two strings
for(i=1;i<strlen(smaller of the strings);i++)
{
int count=0
if(string[i]!=string2[i])...
Well the logic given by our friend is right
use factorial(i)
i took the pain of compiling it in TurboC
here is the debugged program
#include <stdio.h>
#include<conio.h>
its fine in a TurboC compiler if you add getch()
#include <stdio.h>
int main()
{
double a = 0;
printf("enter a number: ");
yes.but how can the compiler identify whether the spaces have been created due to a tab or by typing multiple spaces
but, while copiling using multiple spaces, the turboC compiler gave me an error...
as you say sir
i dont know how you could display 20 values at the same time on the screen
do look at the output generated by my program
it's done using TurboC
#include <stdio.h>
#include<conio.h>
#define...
[B]but if you look at VB
we can easily mask the characters in a text box
perhaps there is a seperate library file in VB which
just allows us to do that????
by the way, what languge is used to...
well obviously the code took -300 also as the temperature
because, it comes under the case
if(temp<cool)
so, it is better if you use a seperate statement like
if(temp==-300)
i am at present working on an ATM paper in the IEEE transcation
the problem is i need t mask the characters that appear on the screen with a "*" when the user is entering the pin
i know that...