C Interview Questions
Questions Answers Views Company eMail

how to find a 5th bit is set in c program

IBM,

4 10655

write a c program to check weather a particluar bit is set or not?

IBM,

5 19048

program to get the remainder and quotant of given two numbers with out using % and / operators?

IBM, College School Exams Tests,

10 25754




can you explain in brief what is "r+" mode in a file... i know that it si used to read and modify rhe existing content.... but explalanation about the file pointer in "r+" mode i wann to know???????????

Cognizant,

2 2539

What is the difference b/w main() in C language and main() in C++.

7 5547

what will happen if you free a pointer twice after allocating memory dynamically ?

Novell,

3 8703

what is dangling pointer?

LG Soft,

1 3603

Can we write a program without main() function?

9 8789




What is the difference between null pointer and the void pointer?

3 6133

How many ways are there to swap two numbers without using temporary variable? Give the each logic.

9 14185

hat is a pointer?

Assurgent,

4 3085

how will you write a program on linked lists using JAVA programming???????????

Keane India Ltd,

1 1727

The purpose of this exercise is to benchmark file writing and reading speed. This exercise is divided into two parts. a). Write a file character by character such that the total file size becomes approximately >10K. After writing close the file handler, open a new stream and read the file character by character. Record both times. Execute this exercise at least 4 times b). Create a buffer capable of storing 100 characters. Now after generating the characters, first store them in the buffer. Once the buffer is filled up, store all the elements in the file. Repeat the process until the total file size becomes approximately >10K.While reading read a while line, store it in buffer and once buffer gets filled up, display the whole buffer. Repeat the exercise at least 4 times with different size of buffer (50, 100, 150 …). Records the times. c). Do an analysis of the differences in times and submit it in class.

832

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.

Cognos,

3238

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

1070


Post New C Questions






Un-Answered Questions { C }

#define f(g,h) g##h main O int i=0 int var=100 ; print f ("%d"f(var,10));} wat would be the output??

781


I have written a pro*C program to fetch data from the cursor. where in i have used the concept of BULK FETCH.... each FETCH statement is taking lots of time to fetch specified number of rows at...

8301


How to check whether string is a palindrome, WITHOUT USING STRING FUNCTIONS?

12958


stripos — Find position of first occurrence of a case- insensitive string int stripos ( char* haystack, char* needle, int offset ) Returns the numeric position of the first occurrence of needle in the haystack string. Note that the needle may be a string of one or more characters. If needle is not found, stripos() will return -1. The function should not make use of any C library function calls.

1042


.find the output of the following program? char*myfunc(char*ptr) { ptr +=3; return (ptr); } int main() { char*x,*y; x="HELLO"; y=myfunc(x); printf("y = %s ",y); return 0; }

157






how to find binary of number?

1829


how many errors in c explain deply

863


how to execute a program using if else condition and the output should enter number and the number is odd only...

860


#include #include struct stu { int i; char j; }; union uni { int i; char j; }; void main() { int j,k; clrscr(); struct stu s; j=sizeof(s); printf("%d",j); union uni u; k=sizeof(u); printf("%d",k); getch(); } what is value of j and k.

2457


The postoder traversal is 7,14,3,55,22,5,17 Then ur Inorder traversal is??? please help me on this

1823


Write a C program linear.c that creates a sequence of processes with a given length. By sequence it is meant that each created process has exactly one child. Let's look at some example outputs for the program. Here the entire process sequence consists of process 18181: Sara@dell:~/OSSS$ ./linear 1 Creating process sequence of length 1. 18181 begins the sequence. An example for a sequence of length three: Sara@dell:~/OSSS$ ./linear 3 Creating process sequence of length 3. 18233 begins the sequence. 18234 is child of 18233 18235 is child of 18234 ........ this is coad .... BUt i could not compleate it .....:( #include #include #include #include int main(int argc, char *argv[]) { int N; pid_t pid; int cont; if (argc != 2) { printf("Wrong number of command-line parameters!\n"); return 1; } N = atoi(argv[1]); printf("Creating process sequence of length %d.\n",N); printf("%d begins the sequence.\n",getpid()); /* What I have to do next ?????? */ }

861


Write an algorithm for implementing insertion and deletion operations in a singly linked list using arrays ?

2172


in ‘C’ language for Matrix Multiplication fails” Introspect the causes for its failure and write down the possible reasons for its failure.

4335


write a C program:There is a mobile keypad with numbers 0-9 and alphabets on it. Take input 0f 7 keys and then form a word from the alphabets present on the keys.

10349


i want to know the procedure of qualcomm for getting a job through offcampus

1203