Top 20 "C" programs asked in interview.

Posted by Utkarsh Jain

Programs :


1. Write a program to find factorial of the given number...
2. Write a program to check whether the given number is even or odd.
3. Write a program to swap two numbers using a temporary variable.
4. Write a program to swap two numbers without using a temporary variable.
5. Write a program to swap two numbers using bit wise operators.
6. Write a program to find the greatest of three numbers.

7. Write a program to find the greatest among ten numbers.
8. Write a program to check whether the given number is a prime.
9. Write a program to check whether the given number is a palindrome c number.
10.Write a program to check whether the given string is a palindrome .
11.Write a program to generate the Fibonacci series.
12.Write a program to print"Hello World"without using semicolon anywhere in the code.
13.Write a program to print a semicolon without using a semicolon anywhere in the code.
14.Write a program to compare two strings without using strcmp() function.
15.Write a program to concatenat e two strings without using strcat() function.
16.Write a program to delete a specified line from a text file.
17.Write a program to replace a specified line in a text file.

18.Write a program to find the number of lines in a text file..
19.Write a C program which asks the user for a number between 1 to 9 and shows the number. If the user
inputs a number out of the specified range, the program should show an error and prompt the user for a
valid input.
20.Write a program to display the multiplication table of a given number..



Note:-

  • The Solution to the above question will be uploaded soon
  • The above question are as per the author point of view.the real questions may be different.

Read More

Top 20 Frequently asked questions in c programming

Posted by Tushar Bedekar

Top 20 "C" programs asked in interview,,.!!!

Programs :

1. Write a program to find factorial
of the given number...
2. Write a program to check whether the given number is even or odd.
3. Write a program to swap two numbers using a temporary variable.
4. Write a program to swap two numbers without using a temporary variable.
5. Write a program to swap two numbers using bitwise operators.
6. Write a program to find the greatest of three numbers.
7. Write a program to find the greatest among ten numbers.
8. Write a program to check whether the given number is a prime.
9. Write a program to check whether the given number is a palindrome c number.
10.Write a program to check whether the given string is a palindrome .
11.Write a program to generate the Fibonacci series.
12.Write a program to print"Hello World"without using semicolon anywhere in the code.
13.Write a program to print a semicolon without using a semicolon anywhere in the code.
14.Write a program to compare two strings without using strcmp() function.
15.Write a program to concatenat e two strings without using strcat() function.
16.Write a program to delete a specified line from a text file.
17.Write a program to replace a specified line in a text file.
18.Write a program to find the number of lines in a text file..
19.Write a C program which asks the user for a number between 1 to 9 and shows the number. If the user
inputs a number out of the specified range, the program should show an error and prompt the user for a
valid input.
20.Write a program to display the multiplica tion table of a given number..

Note:-The solution will be published shortly stay connected with us.
Read More

Pointers in C and C++

Posted by Tushar Bedekar
The correct understanding and use of pointers is crucial to successful C programming. There are several reasons for this: First, pointers provide the means by which functions can modify their calling arguments. Second, pointers support dynamic allocation. Third, pointers can improve the efficiency of certain routines. Finally, pointers provide support for dynamic data structures, such as binary trees and linked lists.
Pointers are one of the strongest but also one of the most dangerous features in C. For example, a pointer containing an invalid value can cause your program to crash. Perhaps worse, it is easy to use pointers incorrectly, causing bugs that are very difficult to find. Because of their importance and their potential for abuse, this chapter examines the subject of pointers in detail.

What Are Pointers?

A pointer is a variable that holds a memory address. This address is the location of another object (typically another variable) in memory. For example, if one variable contains the address of another variable, the first variable is said to point to the second. 


Pointer Variables

If a variable is going to be a pointer, it must be declared as such. A pointer declaration consists of a base type, an *, and the variable name. The general form for declaring a pointer variable is
type *name;
where type is the base type of the pointer and may be any valid type. The name of the pointer variable is specified by name.
The base type of the pointer defines the type of object to which the pointer will point. Technically, any type of pointer can point anywhere in memory. However, all pointer operations are done relative to the pointer's base type. For example, when you declare a pointer to be of type int *, the compiler assumes that any address that it holds points to an integer— whether it actually does or not. (That is, an int * pointer always ''thinks" that it points to an int object, no matter what that piece of memory actually contains.) Therefore, when you declare a pointer, you must make sure that its type is compatible with the type of object to which you want to point.

The Pointer Operators

There are two pointer operators: * and &. The & is a unary operator that returns the memory address of its operand. (Remember, a unary operator only requires one operand.) For example,
m = &count;
places into m the memory address of the variable count. This address is the computer's internal location of the variable. It has nothing to do with the value of count. You can think of & as returning "the address of." Therefore, the preceding assignment statement can be verbalized as "m receives the address of count."
Image result for pointer in cTo understand the above assignment better, assume that the variable count uses memory location 2000 to store its value. Also assume that count has a value of 100. Then, after the preceding assignment, m will have the value 2000.
The second pointer operator, *, is the complement of &. It is a unary operator that returns the value located at the address that follows. For example, if m contains the memory address of the variable count,
q = *m;
places the value of count into q. Thus, q will have the value 100 because 100 is stored at location 2000, which is the memory address that was stored in m. You can think of * as "at address." In this case, the preceding statement can be verbalized as "q receives the value at address m."

note:-These are the basic things that we have discussed today for more articles on pointer stay connected with us.

For any kind of doubts feel free to ask on contact us
     
Read More

How to get best Android phone for today: 5 models

Posted by Tushar Bedekar
These days everyone seems to want the latest smart phone to come out, but who can blame them when you look at how rapidly these devices are improving. Technology truly has ramped up the speed at which we consume new products, although that simply means that consumers have more access to better quality materials. Although Apple continues to dominate the smart phone market, there is no question that Android is highly popular and a good percentage of the population would not even consider purchasing a new phone. If you want to get your hands on the latest Android phone's, a good place to start is by doing some research on the internet and checking out the various models that they currently have available. 
Although you might want to go into the store to make your actual purchase, more and more people are preferring to pick up their new smart phones over the internet. This is due in large part to the fact that you can generally get much better deals over the internet, because the online retailers have to compete with all sorts of sites, where as if you were to walk into a store, they do not have much competition. For this reason alone, you should see if you can find a better price online, although it is a good idea to head to the stores to actually get the phones you are looking at in your hand, so you get a feel of whether you like them or not. However, if you are a die hard Android fan, this may not pertain to you, as you likely are going to purchase their products anyway. 
If you are looking into getting a brand new Android phone, you may want to consider some of these models. The Samsung Galaxy Note 5 has gotten great reviews online and is far superior than the previous models that Samsung has put out in the past, which were lacking in a great deal of areas. They Galaxy Note 5 features a top of the line display screen, which has gotten the phone a lot of attention. The overall features in the phone, in regards to multitasking, taking pictures and videos, and maintaining a long battery life, are drastically better than previous Samsung models. 
The LG G4 is one of the highest rated Androids on the market right now and they have been called a great all around smart phone. The display screen is crisp and the camera takes high quality shots consistently and there is no question that the software is drastically improving as well. Samsung has another great Android model out, which is the Galaxy S6. This phone has had some reviews that are calling it hands down the best phone on the market, including the iPhone, which got a ton of people's attention. There is no doubt that this is a high quality phone worth considering and at about three hundred dollars less than the Galaxy Note 5, it may be an overall better purchase.
If you are looking for a bit of a cheaper phone that still has a ton of the same capabilities and looks great, you might want to check out the Moto X. Although this phone is less popular and has gotten lower reviews, the camera is of the utmost quality, the software on the phone is great and it holds a long battery life. The Sony Xperia Z5 Premium is another great phone that will also likely get you a lot of looks. This is due to the fact that they sell a bright gold smart phone, which looks amazing and is on par function wise as the top Androids on the market.

About Author: This article was written by Andy G, a tech geek and Linux guru from Austria. At the present moment he maintains firmware 

and driver download website called http://www.helpjet.net/
Read More

How A Software Actually Works On A Hardware

Posted by Tushar Bedekar
Hi,Today We are going to discuss a new topic which may be very old but important one, also a big question in front of  us.

What is a Program me?

As we all know that a program me is a group of instruction which is needed to be executed by the machine like a computer to perform a certain task.but the biggest question is that how these group instruction are executed on the hardware to perform a assigned task.Basically these instructions which are being executed are itself a group of micro instruction an microcode.which are executed on any machine to execute a one particular instruction. now,

what is programming?

 Actually the programming is nothing but Def:- provide (a computer or other machine) with coded instructions for the automatic performance of a task.But This definition does not gives the full idea about what actually the programming is? and also it does not gives the idea about how the software runs on the hardware.   

As we all have listened about PLA`s(programmable array logic), PAL`s (programmable logical array) and also about FPLA (field programmable logical array).Basically these are the logical devices consisting of arrays of AND & OR gates and also other different supporting devices.These devices may be Hardwired or may be re-programmable.

How To program me these devices?  

Basically devices consist of programmable AND & OR gates.That these arrays consist of fussing and re fussing technology.These fuses may be burned and or lay intact as per the requirement.This fussing can be done generally by supplying a sufficient amount of current through the fuse. 


Types of fuses:- 

  • Metallic Fuses.
  • Diode/Transistors fuses
  • Silicon Fuses.Etc
So by fussing the different fuses the programming can be done.


Publisher's Last Words:

  • If you Find this article incomplete please help us to improve it.I am greatly honored if helps us. contact us
  • If you want to post your article on http://www.allaboutcomputing.net you can contact us at link:- contact us. For more about Computer programming and computer technology or web designing stay connected with http://www.allaboutcomputing.net .
  • I hope you have got answers of some Questions by this small post and I know you have lot of questions, So please feel free to ask in comment section or you can mail me my    e mail id is : tushar.bedekar11@gmail.com 



 


Read More

What is BootStrap

Posted by Tushar Bedekar

Definition - What does Bootstrap mean?

A bootstrap is the process of starting up a computer. It also refers to the program that initializes the operating system (OS) during start-up.

The term bootstrap or bootstrapping originated in the early 1950s. It referred to a bootstrap load button that was used to initiate a hardwired bootstrap program, or smaller program that executed a larger program such as the OS. The term was said to be derived from the expression “pulling yourself up by your own bootstraps;” starting small and loading programs one at a time while each program is “laced” or connected to the next program to be executed in sequence.
OR
Bootstrap is the process of loading a set of instructions when a computer is first turned on or booted. During the start-up process, diagnostic tests are performed, such as the power-on self-test (POST), that set or check configurations for devices and implement routine testing for the connection of peripherals, hardware and external memory devices. The boot loader or bootstrap program is then loaded to initialize the OS.

Typical programs that load the OS are:

  • GNU grand unified boot loader (GRUB): A multiple boot specification that allows the user to choose one of several OSs

  • NT loader (NTLDR): A bootloader for Microsoft’s Windows NT OS that usually runs from the hard drive

  • Linux loader (LILO): A bootloader for Linux that generally runs
    from a hard drive or floppy disc

  • Network interface controller (NIC): Uses a boot loader that supports booting from a network interface such as Ether boot or pre-boot execution environment (PXE)
Prior to bootstrap a computer is said to start with a blank main memory and an intact magnetic core memory or kernel. The bootstrap allows the sequence of programs to load in order to initiate the OS. The OS is the main program that manages all programs that run on a computer and performs tasks such as controlling peripheral devices like a disc drive, managing directories and files, transmitting output signals to a monitor and identifying input signals from a keyboard. 

Bootstrap can also refer to as preparing early programming environments incrementally to create more complex and user-friendly programming environments. For example, at one time the programming environment might have consisted of an assembler program and a simple text editor. Over time, gradual improvements have led to today's sophisticated object-oriented programming languages and graphical integrated development environments (IDEs).

Read More

What is the Diffeence Between Execution & Processing

Posted by Tushar Bedekar

What is Processing:-

In computing, a process is an instance of a computer program that is being executed. It contains the program code and its current activity. Depending on the operating system (OS), a process may be made up of multiple threads of execution that execute instructions concurrently
A computer program is a passive collection of instructions; a process is the actual execution of those instructions. Several processes may be associated with the same program; for example, opening up several instances of the same program often means more than one process is being executed.
Multitasking is a method to allow multiple processes to share processors (CPUs) and other system resources. Each CPU executes a single task at a time. However, multitasking allows each processor to switch between tasks that are being executed without having to wait for each task to finish. Depending on the operating system implementation, switches could be performed when tasks perform input/output operations, when a task indicates that it can be switched, or on hardware interrupts.
A common form of multitasking is time-sharing. Time-sharing is a method to allow fast response for interactive user applications. In time-sharing systems, context switches are performed rapidly. This makes it seem like multiple processes are being executed simultaneously on the same processor. The execution of multiple processes seemingly simultaneously is called concurrency.
For security and reliability reasons most modern operating systems prevent direct communication between independent processes, providing strictly mediated and controlled inter-process communication functionality.

What is Execution:- 

The dictionary meaning of the execution is carrying out of a plan, order, or course of action 
or in other words it is an act of doing or performing something.

Examples:-




  1. He is in prison awaiting execution.
  2. The quarterback's execution of the play was perfect.
  3. skillful execution of the dance steps
  4. Execution of sequential instruction of the program me.  

Sources:-

Wikipedia

Read More
back to top