notepad interview questions
Top notepad frequently asked interview questions
My Text files (.txt
) are not opening. Instead, they are printing as the default command when I double-click on any file.
I realized that the print command is default now and open is not the default command.
How do i change it back?
Source: (StackOverflow)
on some Windows 7 machine, notepad.exe
can launch from desktop
but lots of Windows 7 machine, no matter x86 or x64, it cannot start. no error no warning, just silently quit, like you never click on it before.
Is there any policy or system setting to block this?
I thought it is quite common to copy notepad.exe
to anyplace and run it, lots of Windows installer sample do this.
Source: (StackOverflow)
I have a Windows 7 PC, and since a couple of days ago if I try to open notepad i get the following error:
Windows cannot find
C:\Windows\System32\notepad.exe
.
Make sure you typed the name
correctly, and they try again.
By performing a search I found that notepad.exe in c:\windows, c:\windows\system and c:\windows\system32, and in all three locations I have tried to replace it with the file taken from another Windows 7 PC but I get the same error.
Source: (StackOverflow)
I could do this easily with TextPad, then I got irritated with Textpad once I'd played with Notepad++.
Now that I've removed Textpad:
- I want Notepad++ to take over the right-click > Edit option in Explorer, and
- I want Notepad++ to come up when I type
notepad
in the command prompt.
I know that Notepad++ has a shell extension that allows one to do right-click > Edit in Notepad++. But my old right-click > Edit link remains, and I keep finding myself clicking on it, only to be rewarded with an error.
Source: (StackOverflow)
This question already has an answer here:
On windows 7 (x64), the default option, for saving text files in notepad is ANSI.
One can select other encoding from the combo box, however, I'd like this option to be the default.
Source: (StackOverflow)
I have a list like this:
1 http://
2 http://
3 http://
4 http://
5 http://
I would like to remove 1,2,3,4,5 without doing this manually for each line. The only tool I am using is notepad in a bare Windows setup.
How can i remove this in Notepad or Microsoft Word?
Source: (StackOverflow)
Say, for example, that there's one process that's writing to a file. While the process is running, I opened the file in notepad. The process keeps writing to the file.
Other than closing and reopening the file, is there any way for me to "refresh" the data that notepad is showing?
Source: (StackOverflow)
How do I use the find and replace function in notepad to delete multiple blank lines in a text file?
Source: (StackOverflow)
Here's a puzzling problem - maybe somebody has an idea. Right now I am out of ideas.
On Win7 64bit, the following crashes Notepad:
- On Desktop, right click, select "New | Text Document". This creates "New Text Document.txt".
- Right click on that file, select "Edit". This opens notepad with the empty file.
- Select "File | Save as": Notepad crashes and Win7 reports that "Notepad has stopped working".
Now, move the file to c:\temp
and repeat steps 2 and 3: no crash this time and the save-as dialog appears normally. I can create similar steps for the "open" dialog.
Things I have tried:
- Safe mode - does not work, same problem
- Create a new user and try again logged in as that user - no crash
- Name file differently, or create elsewhere and then move to desktop - same problem
- Use Wordpad instead - same problem
- Review shell extensions with ShellExView - nothing extraordinary here
- Stare at the event log entries for each of the crashes. Does not enlighten me.
- At time of crash look at the process explorer stack view. Hangs at a function "TaskDialog".
sfc.exe /scannow
repaired some files but the problem persists.
This is how the event log entries look like:
Log Name: Application
Source: Application Error
Date: 14.12.2010 00:33:48
Event ID: 1000
Task Category: (100)
Level: Error
Keywords: Classic
User: N/A
Description:
Faulting application name: NOTEPAD.EXE, version: 6.1.7600.16385, time stamp: 0x4a5bc9b3
Faulting module name: COMCTL32.dll, version: 6.10.7600.16661, time stamp: 0x4c6f6e4b
Exception code: 0xc000041d
Fault offset: 0x00000000000db770
Faulting process id: 0x198
Faulting application start time: 0x01cb9b1e140ab92a
Faulting application path: C:\Windows\system32\NOTEPAD.EXE
Faulting module path: C:\Windows\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7600.16661_none_fa62ad231704eab7\COMCTL32.dll
What else should I try, short of dumping my user and starting over with a new profile? Thanks...
Source: (StackOverflow)
What is happening:
Initially my cursor was at "initially here". When I press Ctrl+S
to save the file my cursor automatically moves to the second position.
After many tries, I've seen that it randomly moves to a point one or two lines above the place where it initially was.

(The red line is the cursor - I've drawn it manually since it wont show up in printscreen)
Did anyone notice this thing?
My version of Notepad is:

It is a problem since I keep typing and whenever I save, I have to manually bring the cursor down to the correct place or else I am typing somewhere between the lines!
Source: (StackOverflow)
When I try to save a text file with non-English text in Notepad, I get an option to choose between Unicode, Unicode Big Endian and UTF-8. What is the difference between these formats?
Assuming I do not want any backward compatibility (with older OS versions or apps) and I do not care about the file size, which of these formats is better?
(Assume that the text can be in languages like Chinese or Japanese, in addition to other languages.)
Note: From the answers and comments below it seems that in Notepad lingo, Unicode is UTF-16 (Little Endian), Unicode Big Endian is UTF-16 (Big Endian) and UTF-8 is well UTF-8.
Source: (StackOverflow)
When I press Ctrl+Backspace, sometimes a small square is inserted, instead of the entire word being erased. If I copy and paste the character here, I get this: ``. But it doesn’t look quite like that in the text box – there it’s just a plain white rectangle with a 1px black border.
The problem only happens in some text boxes; in others the shortcut works like it should.
- Start menu search box: works
Notepad: doesn’t work

- Notepad2: works
- Firefox: works
I’m running Windows 7 x64.
Source: (StackOverflow)
In Internet Explorer I can open a local .html file and edit it by selecting "Source" in the "View" menu," make a quick change, and then "Refresh" (reload) the web page.
How can I do that with Google Chrome?
Can I have the .html file open in Windows Notepad? (I like notepad because it's really fast.)
Source: (StackOverflow)