Programming interview Questions and answers |
- How would you display a list box having a check box in front of each item?
- What is main() function in C Programming ?
- Can we execute a program without entering into main( ) function?
- How to write multiline macro in C Language ?
- Displaying standard Properties dialog box
- How to find which processes are running on your system ?
How would you display a list box having a check box in front of each item? Posted: 04 Nov 2009 06:29 PM PST
Ans: We come across a list box having check boxes many times while installing softwares like Microsoft Visual C++, MS-office etc. We can also implement such a list box and give a professional look to our application. This is how it can be done…
| ||||||||
What is main() function in C Programming ? Posted: 04 Nov 2009 06:25 PM PST
| ||||||||
Can we execute a program without entering into main( ) function? Posted: 04 Nov 2009 01:00 AM PST Here is a program which ends before execution of main( ) function starts but still manages to get the output. Basically all global objects are created before entering into main(); So you can write any code into the constructor of objects, which will be called whenever object is created.
| ||||||||
How to write multiline macro in C Language ? Posted: 03 Nov 2009 10:59 PM PST To write a multiline macro we have to use C’s line splitting character, the ‘\’. Here is a macro definition of LINE and the program which uses it: #define LINE for ( i = 0 ; i < 80 ; i++ )\ printf ( “_” ) ;\ printf ( “\n” ) ; main( ) { int i ; LINE ; printf ( “S.No Roll No. Name Phy Math Chem\n” ) ; LINE ; } The macro LINE draws a horizontal line on the screen. The above program attempts to print the name of the fields of the students record in between the two lines. In the LINE macro we have used i as a variable hence, it has to be declared before we use the macro. Since we are using the macro in main( ) function, we have declared i before using the macro. | ||||||||
Displaying standard Properties dialog box Posted: 03 Nov 2009 04:05 PM PST If we right click on a file in Windows Explorer and select Properties from the popup menu it displays a dialog box showing all the properties of that file. We can display the Properties dialog box programmatically. Following code snippet will show Properties dialog box of abc.doc file which is in C drive.
| ||||||||
How to find which processes are running on your system ? Posted: 03 Nov 2009 03:59 PM PST Many a times we need to see whether a particular application is running in the memory. We can get the information of processes running in the memory by using API functions Process32First( ) and Process32Next( ) as shown below.
|
You are subscribed to email updates from Programming Interview Questions And Answers To stop receiving these emails, you may unsubscribe now. | Email delivery powered by Google |
Google Inc., 20 West Kinzie, Chicago IL USA 60610 |
No comments:
Post a Comment