#include<stdio.h>
void main()
{
char a[5]="asdhd";// after printing the character we have to delete it and display it in next line
printf("%c",a[0]);
}
This post has been edited by vsrik015: 20 February 2007 - 01:40 PM




Posted 20 February 2007 - 01:20 PM
#include<stdio.h>
void main()
{
char a[5]="asdhd";// after printing the character we have to delete it and display it in next line
printf("%c",a[0]);
}
This post has been edited by vsrik015: 20 February 2007 - 01:40 PM
Posted 20 February 2007 - 02:14 PM
Posted 20 February 2007 - 02:41 PM
Posted 20 February 2007 - 02:50 PM
#include<stdio.h>
void main()
{
char a[5]="asdhd";// after printing the character we have to delete it and display it in next line
printf("%c",a[0]);
printf("\n%c",a[0]);
}
Best I can offer at this point.This post has been edited by NickDMax: 20 February 2007 - 02:55 PM
Posted 20 February 2007 - 03:01 PM
#include<stdio.h>
void main()
{
char a[5]="asdhd";
printf("%c",a[0]);// how to display the character in next line ,by deleting the
last line's character . I am not getting any idea.
someone can give any clue
}
Posted 20 February 2007 - 10:28 PM
#include <conio.h>
void printAt(int iRow, int iCol, char *sText);
void putchAt(int iRow, int iCol, char ch);
void clearRow(int iRow);
void main()
{
char *sTest="abcdef";
putchAt(1,1,sTest[0]);
printAt(25,1, "Press any key to continue");
getch();
clearRow(1);
putchAt(2,1,sTest[0]);
return;
}
//Prints a zero terminated string at (col, row)
void printAt(int iRow, int iCol, char *sText)
{
gotoxy(iCol - 1, iRow -1);
cprintf(sText);
}
//Prints a single char at a given coordinate
void putchAt(int iRow, int iCol, char ch)
{
gotoxy(iCol - 1, iRow -1);
putch(ch);
}
void clearRow(int iRow)
{
char ch = 32;
int i;
for (i=0; i<79; i++)
{
putchAt(iRow, i, ch);
}
}
