C Interview Questions
Questions Answers Views Company eMail

write a c program to find the largest and 2nd largest numbers from the given n numbers without using arrays

IBM,

1053

how to print the character with maximum occurence and print that number of occurence too in a string given ?

Microsoft,

1258

write c program to display output 10(10+20)+(10+20+30)+ ... n term

Hindustan Gum Chemicals,

1064




write a c program to do the following: a) To find the area of a triangle. b) To convert the temperature from Fahrenheit to Celsius. c) To convert the time in hours : minutes : seconds to seconds.

778

why to assign a pointer to null sometimes??how can a pointer we declare get assigned with a garbage value by default???

669

what will be the output of this program? void main() { int a[]={5,10,15}; int i=0,num; num=a[++i] + ++i +(++i); printf("%d",num); }

Microsoft,

6 3648

write a progrmm in c language take user interface generate table using for loop?

792

Write the program with at least two functions to solve the following problem. The members of the board of a small university are considering voting for a pay increase for their 5 faculty members. They are considering a pay increase of 8%. Write a program that will prompt for and accept the current salary for each of the faculty members, then calculate and display their individual pay increases. At the end of the program, print the total faculty payroll before and after the pay increase, and the total pay increase involved.

1 2638




main() { int i; printf("%d",scanf"%d",&i))//if the input is 12 24 34 then wat will be the output }

2 1727

#include void main() { int a=10,b=20,c=30; printf("%d",scanf("%d%d%d",&a,&b,&c)); } what is the output for this?

IIIT,

4 5163

Is it possible to run using programming C for Java Application?

NIC,

2 2026

write a c program to find reminder and quotient if one number is divided by other.to code this program don't use more than 2 variables

TCS,

2 3327

write a program that declares an array of 30 elements named "income" in the main functions. then cal and pass the array to a programmer-defined function named "getIncome" within the "getIncome" function, ask the user for annual income of 30 employees. then calculate and print total income on the screen using the following function: "void getIncome ( ai []);

TCS,

971

write a programming in c to find the sum of all elements in an array through function.

943

i got 75% in all semester am i eligible for your company

Infosys,

1001


Post New C Questions






Un-Answered Questions { C }

how to construct a simulator keeping the logical boolean gates in c

806


hi folks i m approching for h1 b interview on monday 8th of august at montreal and i m having little problem in my approval notice abt my bithdate my employer has made a mistake while applying it is 12th january and istead of that he had done 18 the of january do any body have any solution for that if yes how can i prove my visa officer abt my real birthdate it urgent please let me know guys thaks dipesh patel

683


about c language

787


Using functions, write a program that multiplies two arrays. Use the following functions: - Function ReadArray - Function MultiplyArrays - Function DisplayArrays

1054


Take an MxN matrice from user and then sum upper diagonal in a variable and lower diagonal in a separate variables. Print the result

566






write a program to print largest number of each row of a 2D array

1116


regarding pointers concept

766


how do you write a function that takes a variable number of arguments? What is the prototype of printf () function?

748


why we wont use '&' sing in aceesing the string using scanf

1015


if p is a string contained in a string?

672


what is the syallabus of computer science students in group- 1?

1057


find out largest elemant of diagonalmatrix

824


illustrate the use of address operator and dereferencing operator with the help of a program guys plzzz help for this question

759


what is used instead of pointers in java than c?

333


The OS is a program that uses various data structures. Like all programs in execution, you can determine the performance and other behavior of the OS by inspecting its state - the values stored in its data structures. In this part of the assignment, we study some aspects of the organization and behavior of a Linux system by observing values of kernel data structures exposed through the /proc virtual file system. The /proc virtual file system: Linux uses the /proc file system to collect information from kernel data structures. The /proc implementation provided with Linux can read many different kernel data structures. If you cd to /proc on a Linux machine, you will see a number of files and directories at that location. Files in this directory subtree each corresponds to some kernel data structure. The subdirectories with numeric names contain virtual files with information about the process whose process ID is the same as the directory name. Files in /proc can be read like ordinary ASCII files. You can open each file and read it using library routines such as fgets() or fscanf(). The proc (5) manual page explains the virtual files and their content available through the /proc file system. Requirements in detail: In this part, you are asked to write a program to report the behavior of the Linux kernel. Your program should run in two different versions. The default version should print the following values on stdout: • Processor type • Kernel version • The amount of memory configured into this computer • Amount of time since the system was last booted A second version of the program should run continuously and print lists of the following dynamic values (each value in the lists is the average over a specified interval): • The percentage of time the processor(s) spend in user mode, system mode, and the percentage of time the processor(s) are idle • The amount and percentage of available (or free) memory • The rate (number of sectors per second) of disk read/write in the system • The rate (number per second) of context switches in the kernel • The rate (number per second) of process creations in the system If your program (compiled executable) is called proc_parse, running it without any parameter should print out information required for the first version. Running it with two parameters "proc_parse " should print out information required for the second version. read_rate represents the time interval between two consecutive reads on the /proc file system. printout_rate indicates the time interval over which the average values should be calculated. Both read_rate and printout_rate are in seconds. For instance, proc_parse 2 60 should read kernel data structures once every two seconds. It should then print out averaged kernel statistics once a minute (average of 30 samples). The second version of your program doesn't need to terminate.

3210