No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
The following code is supposed to read records from input and store them in a file called file.dat. Then it is supposed to arrange these records in ascending order, but for some reason the program hangs at line no.61. Can someone please tell me what's wrong? #include <iostream> #include <fstream> … |
|
The code below will printf out the no. of characters as 6, even if we enter only 2... [CODE] #include<stdio.h> #include<string.h> int main() { FILE *fp; char c; fp=fopen("random","w"); while((c=getchar())!=EOF) putc(c,fp); printf("\nNo. of characters = %ld",ftell(fp)); fclose(fp); } [/CODE] |
|
Can someone please suggest some good books on BIOS programming. |
|
The following program is supposed to sort eight strings in alphabetical order, but its not functioning properly. Can anyone please debug this [CODE]void main() { char *p[8], *s; int i,j,t; clrscr(); printf("Enter the strings:\n"); for(i=0;i<8;i++) gets(p[i]); for(i=0;i<8;i++) { for(j=i+1;j<8;j++) { t=strcmp(p[i],p[j]); if(t>0) { s=p[i]; p[i]=p[j]; p[j]=s; } } } printf("\nSorted … |
|
What is EOF. How is it generated? Which key corresponds to "end of file" on the keybord?? |
|
Can anyone please debug the following binary tree program, it flashes two errors: 1: Type mismatch in redeclaration of 'strdup' 2: Tpe mismatch in redeclaration of 'talloc' [CODE]#include<stdio.h> #include<ctype.h> #include<string.h> #define MAXWORD 100 struct tnode *addtree(struct tnode *, char *); void treeprint(struct tnode *); struct tnode { char *word; int … |
|
Can anyone please explain me, step by step, each line of the following sorting algorithm which sorts the input lines numerically, if -n is given at the command line. (Program taken from the book "The C programming language, by brian kernighan and Dennis Ritchie" - Chapter 5. Section 5.11, page … |
|
Following code when executed, prints out a smiling face (ASCII equivalent of integer 2), but when the format specifier in printf is changed from %c to %d, it does not print integer 2. Any reasons why.... [CODE]main() { int i; int *c; char b[10]={1,2,3,4,5,6,7,8,9,0 }; c=&b[1]; printf("\n%c",*c); }[/CODE] |
|
I was installing Turbo C on my PC and it says "Make sure you insert \TC\Bin into your DOS path". Now how is that done. |
|
I was trying the following TSR which is supposed to capture interrupt no.8 and change screen color every 10 seconds. But either the linker shows a "not enough memory" error, or, nothing appears to happen. Also the program does not seem to be entering the function our(). Please help... [CODE]#include … |
|
I am new to windows programming, I was trying to compile the following code and it gives me the following errors: C:\Program Files\Microsoft Visual Studio\MyProjects\hook\hook.cpp(14) : error C2065: 'KeyboardProc' : undeclared identifier C:\Program Files\Microsoft Visual Studio\MyProjects\hook\hook.cpp(22) : error C2373: 'KeyboardProc' : redefinition; different type modifiers C:\Program Files\Microsoft Visual Studio\MyProjects\hook\hook.cpp(30) : … |
|
Re:
I am writing a RAT in which i have also included a keylogger as a DLL file. here is my code in the keylogger.dll : [CODE] //function.h -- the file which will be referenced by my RAT project file.///////////////////////// extern "C" __declspec(dllexport) void setHook(); //keylogger.h////////////////////////////////////////////////////////////////////////////////////////// #if !defined(AFX_KEYLOGGER_H__5979CE3A_20A6_4172_BBF1_9F7C091CC182__INCLUDED_) #define AFX_KEYLOGGER_H__5979CE3A_20A6_4172_BBF1_9F7C091CC182__INCLUDED_ #if … |