C interview questions – page 14
2,130 questions. Tap “Show answer” to check yourself.
-
How to write a 'C' program to read an array of 10 numbers and print the prime nums?this is what i wrotecould someone tell me where is my mistake?can i use here flag at all?#include <stdio.h>void main (){int arr[10], i, j, flag;for (i=0;i<10;i++)sc
-
Write one statement equivalent to the following two statements
-
Assuming that each integer occupies 4 bytes and each character 1 byte , what is the output of the following programm?
-
How many times while loop gets executed (for any n) ?
-
...input is gujarat.........output is guj.....plz explain how?
-
What will be the value of *i
-
What is the output of this statement ? Printf(%d,printf(%d %d,2,2) & printf(%d %d , 2, 2)); a. 22222 b. 22221 c. It will give an error during compilation
-
Can we access static variable in other file?
-
What is true about the following C Functions
-
Differences between unions and structures in C, explain with examples
-
Write a function to print sum of two *unsigned* integer if there is no overflow otherwise print a message that there is an overflow Note it's unsigned and not signed. Is there any value in limits.h for unsigned MAX as well? like INT_MAX? </p...
-
What are different storage classes?
- Advertisement
-
What is output of a program?
-
Static variables in C
-
I want C program code for : Reverse the links of a linked list by traversing only once Input:The input consists of the information in each node of the linked list. Output:The program displays the information in the linked list after the links are reversed
-
How much memory is taken by a pointer variable?
-
Write a C program to find endianness of your machine
-
How to determine multiinclusion of header file in C, i.e., how to check if same header file is included more than once?
-
Output of the program
-
How many times geeksforgeeks will be printed?
-
How to return multiple values from a function?
-
Allocate 2D array dynamically with min no. of malloc calls.
-
Union u1{int i;char c;}u2;u2.i=32767;u2.c='a';now the i value gets replaced.If we want to know the data that is saved in the union..internally, without knowing what values that we are using in the prog.that is if just want to know whether a union
-
1.WRITE A 'C' PROGRAM TO READ THE AGE OF 100 PERSONS AND COUNT THE NUMBER OF PERSONS IN THE AGE GROUP 50 TO 60.USE FOR LOOP AND CONTINUE STATEMENTS.(10 MARKS)2.WRITE A PROGRAM TO READ A POSITIVE INTEGER AND PRINT ITS BINARY EQUIVALENT.(10 MARKS)3.
- Advertisement
-
Struct Foo{char *pName;char *pAddress;};main(){struct Foo *obj = malloc(sizeof(struct Foo));clrscr();obj->pName = malloc(100);obj->pAddress = malloc(100);strcpy(obj->pName,"Your Name");strcpy(obj->pAddress, "Your Address");free(obj);printf("%s", obj->pNam
-
How many times is the printf statement executed for n=10?
-
Which of these are valid declarations?
-
What fucntion will read a specified number of elements from a file?
-
Number of times multiplication is required:
-
How malloc and free are implemented , how os deals wit them, etc