# Placement Papers: Accenture Question Paper Programming in C

Glide to success with Doorsteptutor material for CTET/Paper-1 : get questions, notes, tests, video lectures and more- for all subjects of CTET/Paper-1.

(IDC Recruitment Paper)

1. Study the Following Points:
1. One Cannot Take the address of a Bit Field
2. Bit fields cannot be arrayed
3. Bit-Fields are machine Dependant
4. Bit-fields cannot be declared as static

Which of the Following Statements are true w. r. t Bit-Fields

1. a, b&c
2. Only a & b
3. Only c
4. All
2. What is the function of ceil (X) defined in math. h do?
1. It returns the value rounded down to the next lower integer
2. it returns the value rounded up to the next higher integer
3. the Next Higher Value
4. the next lower value
3. When do you say that a digraph is acyclic
1. if and only if its first search does not have back arcs
2. a digraph is acyclic if and only if its first search does not have back vertices
3. if and only if its first search does not have same dfnumber
4. None of these
4. A function q that accepts a pointer to a character as argument and returns a pointer to an array of integer can be declared as:
1. int (⚹ q (char ⚹) ) []
2. int ⚹ q (char ⚹) []
3. int (⚹ q) (char ⚹) []
4. None of the Above
5. What kind of sorting is this: SORT (k, n)
1. [Loop on I Index] repeat thru step2 for i = 1,2, n − 1
2. [For each pass, get small value] min = i; repeat for j = i + 1 to N do {if K [j] min = j;} temp = K [i] ; K [i] = K [min] ; K [min] = temp
3. [Sorted Values will be returned]

Which is correct?

1. Bubble Sort
2. Quick Sort
3. Selection Sort
4. Merge Sort
6. Which of the Following is not defined in string. h?
1. strspn ()
2. strerror ()
3. memchr ()
4. strod ()
7. Identify the correct argument for the function call fflush () in ANSI C:
1. stdout
2. stdin
3. stderr
4. All the above
8. Which of the Following will define a type NODE that is a node in a Linked list?
1. struct node {NODE ⚹ next; int x;} ; type def struct node NODE
2. typedef struct NODE {struct NODE ⚹ next; int x;}
3. typedef struct NODE {NODE ⚹ next; int x;}
4. typedef struct {NODE ⚹ next; int x;} NODE
9. Which of these statements are false w. r. t File Functions?
1. fputs ()
2. fdopen ()
3. fgetpos ()
4. ferror ()

Which is correct?

1. ii
2. i, ii
3. iii
4. iv
10. Study the code: Void show () main () {show () ;} void show (char ⚹ s) {printf ( “% sn” s) ;} What will happen if it is compiled & run on an ANSI C Compiler?
1. It will compile & nothing will be printed when it is executed
2. It will compile but not link
3. The compiler will generate an error
4. The compiler will generate a warning
11. Look at the Code: #include void main () {char s1 [] = “abcd” char s2  char s3 [] = “efgh” int i; clrscr () ; i = strcmp (strcat (s3, ctrcpy (s2, s1) ) strcat (s3, “abcd” ) ) ; printf ( “% d” i) ;} What will be the output?
1. No output
2. A Non Integer
3. 0
4. Garbage
12. Look at the Code: Main () {int a [] = {1,2, 3} , i; for (i = 0; i < 3; i ++) {printf ( “% d” ⚹ a) ; a ++ ;} } Which Statement is/are True w. r. t the above code?
1. Executes Successfully & Prints the contents of the array
2. Gives the Error: Value Required
3. The address of the array should not be changed
4. None of the above:

Which is correct?

1. Only I
2. Only II
3. II & III
4. IV
13. What is the output? #define fun (a, b, t) (g ##t = (a) (a) , = (b) (b) , = g##t) float gfloat; main () {float a = 1.12, b = 3.14; fun (a, b, float) ; printf ( “na =% 4.2f, b =% 4.2f” a, b) ;}
1. Error in Defining Macro
2. a = 1.12, b = 3.14
3. a = 3.14, b = 1.12
4. None of the Above

Developed by: