Monday 26 December 2016

5:Programming Skills Introduction to the C Language:

The C Language and its Advantages – The Structure of a C Program ‐ Data Types, Variables,
Constants ‐ Operands, Operators, and Arithmetic Expressions ‐ Input/ Output Management ‐ The
getchar() and putchar() Functions – Single ‐ character I/O – string I/O ‐ Formatted Input and output
Function.
Introduction ‐ goto statement – If ‐ else statement ‐ nested if ‐ else statement – switch statement ‐
for loop ‐ nested for loop ‐ while loop – do ‐ while loop – break statement ‐ continue statement ‐
exit() function. Functions: Introduction ‐ Call by Value and Call by Reference – return values –
recursion – Arrays ‐ Introduction to Arrays ‐ Initialization of Array ‐ Multi dimensional. Pointers –
Introduction – definition ‐ address operator ‐ pointer variables ‐ pointers to pointers ‐ pointers and
arrays: ‐ pointers and functions – Files – Introduction – File Structure ‐ File handling functions ‐ File
Types ‐ Error Handling – Structure – Introduction – declaring – initialization
Introduction to OOP, Class & Objects:
Object Oriented Programming Paradigm ‐ Basic Concepts of OOP ‐ Benefits of OOP ‐ Object
Oriented Languages ‐ Features of OOP ‐ How OOP Differ from Procedure Oriented Programming ‐
applications of OOP ‐ structure of C++ Program ‐ basic Data Types in C++ ‐ Operators in C++ ‐ Scope
Resolution Operator ‐ Member Dereferencing Operators – memory management operators ‐
Introduction of Classes ‐ Inline member functions – Objects ‐ Arrays of Objects ‐ Objects as
Function Arguments ‐ Static data member and static member functions – Constructors ‐
Parameterized Constructors – Default Argument constructors – Copy Constructors – Destructors –

Friend functions.


Objective Type Que

QuestionID  :  17816         Subject Name  DBT
Q1. Which of the following is not a feature of a CURSOR FOR loop?
     1.  Record type declaration
     2.  Opening and parsing of SQL statements
     3.  Fetches records from curso
     4.  Requires exit condition to be defined
     Correct Answer : 4
      2
QuestionID  :  17832         Subject Name  DBT
Q2. Which of the following trigger types will be impacted by constraining factors brought on by mutating tables?
     1.  Row triggers only
     2.  Statement triggers only
     3.  Both row and statement triggers
     4.  Neither row or statement triggers
     Correct Answer : 1
      1
QuestionID  :  17873         Subject Name  DBT
Q3. The owner of all data dictionary tables in Oracle is
     1.  SYSTEM
     2.  SYS
     3.  INTERNAL
     4.  Users
     Correct Answer : 2
      2
QuestionID  :  17890         Subject Name  DBT
Q4. The 3 different flavours of oracle8i are oracle8i Workgroup server,oracle8i Enterprise edition and ___________
     1.  oracle8i application server
     2.  Beginners oracle
     3.  personal oracle
     4.  business oracle
     Correct Answer : 3
      1
QuestionID  :  17906         Subject Name  DBT
Q5. _____DMLs require a user to specify what data is needed and how to get that data.
     1.  Non-procedural
     2.  Procedual
     3.  Both
     4.  None of above
     Correct Answer : 2
      3
QuestionID  :  17934         Subject Name  DBT
Q6. DML statements in a query language are translated into low level instruction by_________.
     1.  Embeded DML Compiler
     2.  DML Compiler
     3.  Query Processor
     4.  Query Evaluation Engine
     Correct Answer : 2
      1
QuestionID  :  17973         Subject Name  DBT
Q7. tables generated on compilation of data defination language are stored in
     1.  data abstraction
     2.  data file
     3.  data dictionary
     4.  meta data
     Correct Answer : 4
      2
QuestionID  :  17989         Subject Name  DBT
Q8. Which one of the following is not valid relational database
     1.  SYBASE
     2.  ORACLE
     3.  IMS
     4.  UNIFY
     Correct Answer : 4
      2
QuestionID  :  18017         Subject Name  DBT
Q9. User can not perform any DDL commands on SYNONYM except _________
     1.  create
     2.  alter
     3.  drop
     4.  None Of the Above
     Correct Answer : 3
      4
QuestionID  :  18092         Subject Name  DBT
Q10. long can store upto ____
     1.  1 GB
     2.  2 GB
     3.  255 kb
     4.  4 kb
     Correct Answer : 2
      4
QuestionID  :  18096         Subject Name  DBT
Q11. Create table mytable as select * from emp where 1=2
     1.  this will copy structure and not the data
     2.  this will copy structure and the data
     3.  Both A and B
     4.  Error
     Correct Answer : 1
      0
QuestionID  :  18112         Subject Name  DBT
Q12. The _____ function gives the largest integer smaller than or equal to value
     1.  FLOOR
     2.  CEIL
     3.  NVL
     4.  ROUND
     Correct Answer : 1
      4
QuestionID  :  18120         Subject Name  DBT
Q13. ____ command is used to delete data from table but preserves structure of table.
     1.  DROP
     2.  TRUNCATE
     3.  DELETE
     4.  Both A and B
     Correct Answer : 2
      4
QuestionID  :  18142         Subject Name  DBT
Q14. Which date function out of these is not going to return a value of DATE datatype
     1.  ADD_MONTHS
     2.  ROUND
     3.  MONTHS_BETWEEN
     4.  None of above
     Correct Answer : 3
      3
QuestionID  :  18143         Subject Name  DBT
Q15. Which of the following is not the aggregate function given in SQL?
     1.  avg
     2.  mean
     3.  max
     4.  sum
     Correct Answer : 2
      2
QuestionID  :  18148         Subject Name  DBT
Q16. To show user synonyms
     1.  select * from syn;
     2.  select * from user_synonyms;
     3.  both a and b
     4.  none
     Correct Answer : 3
      3
QuestionID  :  18159         Subject Name  DBT
Q17. Which is the attribute of implicit cursor?
     1.  SQL%ROWCOUNT
     2.  SQL%FOUND
     3.  SQL%NOTFOUND
     4.  All of the above
     Correct Answer : 4
      4
QuestionID  :  18161         Subject Name  DBT
Q18. To find information about trigger status , which of the following
     1.  ALL_TRIGGERS
     2.  ALL_OBJECTS
     3.  ALL_TRIGGER_COLS
     4.  ALL_SOURCE
     Correct Answer : 3
      0
QuestionID  :  18163         Subject Name  DBT
Q19. UPDATE OR DELETE O SOCCER_FAN_SNACKS. Which of the following keywords may be useful in your trigger source code to distinguish what should run and when ?
     1.  inserting
     2.  updating
     3.  deleting
     4.  truncating
     Correct Answer : 2
      0
QuestionID  :  18195         Subject Name  DBT
Q20. The CHECK_THEATER trigger of the THEATER table has been disabled.Which command can you issue to enable this trigger.
     1.  alter trigger CHECK_THEATER enable
     2.  enable trigger CHECK_THEATER
     3.  alter table CHECK_THEATER enable CHECK_THEATER
     4.  enable CHECK_THEATER
     Correct Answer : 1
      0
QuestionID  :  18204         Subject Name  DBT
Q21. What is the work of FETCH statment of PL/SQL
     1.  Fetching data from DB
     2.  Moving cursor from current to next Row
     3.  Both are correct
     4.  Both are wrong
     Correct Answer : 1
      0
QuestionID  :  18233         Subject Name  DBT
Q22. The two implicit variables available to trigger that contain row values before and after updates are________ and _______.
     1.  old,new
     2.  in,out
     3.  :new,:old
     4.  :in,:out
     Correct Answer : 3
      3
QuestionID  :  18245         Subject Name  DBT
Q23. __________ is used to give meaningful alternative name for database object.
     1.  Sequence
     2.  Savepoint
     3.  Copy
     4.  Synonym
     Correct Answer : 4
      0
QuestionID  :  18251         Subject Name  DBT
Q24. Which of the following parameter is used in procedure to return more than one value
     1.  in
     2.  out
     3.  both
     4.  none
     Correct Answer : 2
      3
QuestionID  :  18263         Subject Name  DBT
Q25. ---- IS A POINTER THAT SPECIFIES THE ACTUAL LOCATION OF LOB STORED OUTSIDE DATABASE
     1.  BFILE
     2.  LOCATOR
     3.  BOTH 1 and 2
     4.  NONE
     Correct Answer : 2
      0
QuestionID  :  18273         Subject Name  DBT
Q26. Which of following is Pseudo column?
     1.  Currval
     2.  Rowid
     3.  Rownum
     4.  All of above
     Correct Answer : 4
      2
QuestionID  :  18347         Subject Name  DBT
Q27. _________ process of Database is used to cleaning up temporary segment that are no longer in use.
     1.  System Manager(SMON)
     2.  Checkpoint(CKPT)
     3.  Process Monitor(PMON)
     4.  Archiever(ARCH)
     Correct Answer : 1
      0
QuestionID  :  18365         Subject Name  DBT
Q28. 2NF applies only to the tables with composite primary keys
     Correct Answer : T
      T
QuestionID  :  18366         Subject Name  DBT
Q29. The inner join (or equi join) is same as the natural join
     Correct Answer : T
      T
QuestionID  :  18416         Subject Name  DBT
Q30. No column of a Non-key preserved table can be modified through a view
     Correct Answer : T
      F
QuestionID  :  18426         Subject Name  DBT
Q31. The inner joins(or equi joins) is same as natural joins.
     Correct Answer : T
      T
QuestionID  :  18434         Subject Name  DBT
Q32. 1NF specifies that there should be repeatating groups
     Correct Answer : F
      F
QuestionID  :  18519         Subject Name  DBT
Q33. For a valid UNION of two result sets, the column names of the result sets should match
     Correct Answer : F
      T
QuestionID  :  18522         Subject Name  DBT
Q34. The UNIQUE and FOREGIN keys cannot have NULL values
     Correct Answer : F
      F
QuestionID  :  18533         Subject Name  DBT
Q35. The UNIQUE key cannot have NULL values
     Correct Answer : F
      F
QuestionID  :  18541         Subject Name  DBT
Q36. Using varchar2 saves disk space when compared to char
     Correct Answer : T
      T
QuestionID  :  18543         Subject Name  DBT
Q37. !=,<>,^= all denote same operation
     Correct Answer : T
      F
QuestionID  :  18583         Subject Name  DBT
Q38. A new coloumn can always be added in a table but a coloumn can be drop only oracle8i onwards.
     Correct Answer : T
      0
QuestionID  :  18630         Subject Name  DBT
Q39. pseudo column such as curval ,nextval,rownum and subqueries are not allowed in condition given by CHECK constraint
     Correct Answer : T
      0
QuestionID  :  18651         Subject Name  DBT
Q40. Inline view is not a schema object.
     Correct Answer : T
      F
QuestionID  :  18674         Subject Name  DBT
Q41. PL/SQL supports boolean data type.
     Correct Answer : T
      T
QuestionID  :  18746         Subject Name  DBT
Q42. SQLCODE function returns the error code for Exception.
     Correct Answer : T
      T
QuestionID  :  18757         Subject Name  DBT
Q43. RedoLog functioning is controlled by the mode in which database is running.
     Correct Answer : T
      0
QuestionID  :  18858         Subject Name  DBT
Q44. ROLLBACK cannot be fired from the SQL prompt without the SAVEPOINT clause.
     Correct Answer : F
      T
QuestionID  :  18865         Subject Name  DBT
Q45. The close statement disables the cursor and the active set becomes undefined.
     Correct Answer : T
      0
QuestionID  :  18915         Subject Name  DBT
Q46. The DELETE or MODIFY operations affect the Master table.
     Correct Answer : F
      T
QuestionID  :  18942         Subject Name  DBT
Q47. Privileges once given cannot be taken back by the owner of the object.
     Correct Answer : F
      T
QuestionID  :  18947         Subject Name  DBT
Q48. In an SQL attribute EXPLAIN function displays SQL statement statistics.
     Correct Answer : F
      0
QuestionID  :  18956         Subject Name  DBT
Q49. NUM[WIDTH] attributes sets the size(in bytes) of the increments in which SQL*Plus retrieves a LONG,CLOB or NCLOB value.
     Correct Answer : F
      0
QuestionID  :  18959         Subject Name  DBT
Q50. SQLN[UMBER] attribute sets the prompt for the second and subsequent lines of a SQL command or PL/SQL block.
     Correct Answer : T
      0

QuestionID  :  13910         Subject Name  C_CET
Q1. Find the output
void main()
{
printf(”%d”);
}
     1.  garbage
     2.  -1
     3.  0
     4.  1
     Correct Answer : 3
      0
QuestionID  :  13912         Subject Name  C_CET
Q2. ## in ‘C’ language represents …..
     1.  There is nothing like ## in ‘C’ language
     2.  It indicates starting of the directive
     3.  Token-Pasting Operator
     4.  Starting of a macro code
     Correct Answer : 3
     
QuestionID  :  13919         Subject Name  C_CET
Q3. A null pointer is an un-initialized pointer?
     Correct Answer : T
     
QuestionID  :  13924         Subject Name  C_CET
Q4. Identify the wrong statement
     1.  putchar(65)
     2.  putchar(`x`)
     3.  putchar("x")
     4.  putchar(`\n`)
     Correct Answer : 3
     
QuestionID  :  13966         Subject Name  C_CET
Q5. What would be output of the following program
main()
{
printf(5+”Sunbeam Infotech”);
}
     1.  am Infotech
     2.  Sunbeam Infotech
     3.  error
     4.  none of the above
     Correct Answer : 1
     
QuestionID  :  13974         Subject Name  C_CET
Q6. The macro va_start is used to initialize a pointer to the beginning of the list of fixed arguments
     Correct Answer : F
     
QuestionID  :  13975         Subject Name  C_CET
Q7. Which header file should you include if you are to develop a function which can accept variable number of arguments?
     1.  vararg.h
     2.  stdlib.h
     3.  stdio.h
     4.  stdarg.h
     Correct Answer : 4
     
QuestionID  :  14037         Subject Name  C_CET
Q8. void main()
{
int success();
int (*sun)();
sun = success;
(*sun)();
printf(“%d”,(*sun)());
}
int success()
{
printf(“Hello”);
return (3.33);
}
     1.  Hello 3 Hello 3
     2.  Hello 3
     3.  Hello Hello 3
     4.  compilation error
     Correct Answer : 3
     
QuestionID  :  14039         Subject Name  C_CET
Q9. Aaa(){printf(“Hi”);}
Bbb(){printf(“Hello”);}
Ccc(){printf(“Bye”);}
void main()
{
int (*ptr[3])();
ptr[0] = Aaa;
ptr[1] = Bbb;
ptr[2] = Ccc;
ptr[2]();
}
     1.  Hello
     2.  Hi
     3.  Bye
     4.  Compilation error
     Correct Answer : 3
     
QuestionID  :  14116         Subject Name  C_CET
Q10. struct temp
{
int a;
struct temp no_roll;
double c;
}obj;
     1.  Underscore cannot be used in variable declaration.
     2.  it will be compiled successfully.
     3.  obj must be a pointer to struct
     4.  error: struct variables cannot be included in its own structure
     Correct Answer : 4
     
QuestionID  :  14119         Subject Name  C_CET
Q11. int takefirst(int a,int b,int c)
{
return (++a,b+2,c);
}
void main( )
{
static int m,n;
m = takefirst(n,m,n);
printf(“%d”,m);
}
     1.  2
     2.  1
     3.  0
     4.  syntax error in the return statement
     Correct Answer : 3
     
QuestionID  :  14122         Subject Name  C_CET
Q12. void main( )
{
int i,fun1( ),fun2,fun3;
int ( *f[3] )( );
f[0] = fun1;
f[1] = fun2;
f[2] = fun3;
for(i=0;i<3;i++)
( *f[i] )( );
}
fun1( )
{
printf(“SUNBEAM”);
fun2( );
}
fun2( )
{
printf(“INFOTECH”);
}
fun3( )
{
printf(“MARKET YARD”);
}
     1.  SUNBEAM INFOTECH MARKET YARD
     2.  SUNBEAM INFOTECH MARKET YARD
     3.  SUNBEAM INFOTECH INFOTECH MARKET YARD
     4.  Error: Invalid pointer assignment
     Correct Answer : 3
     
QuestionID  :  14123         Subject Name  C_CET
Q13. void main()
{
printf("Today \r is a\7 great \t\r\\day");
}
     1.  \day a great
     2.  today is a great day
     3.  \daya great
     4.  is a great \day
     Correct Answer : 3
     
QuestionID  :  14128         Subject Name  C_CET
Q14. new->data = 20;
new->next = temp->next;
temp->next= new;
The above code will –- the item (new) in the list.
     1.  insert
     2.  modify
     3.  delete
     4.  traverse
     Correct Answer : 1
     
QuestionID  :  14150         Subject Name  C_CET
Q15. There can not be circular
     1.  singly linked list
     2.  queue
     3.  stack
     4.  tree
     Correct Answer : 3
     
QuestionID  :  14152         Subject Name  C_CET
Q16. ---- sorting method is least efficient time complexity wise.
     1.  quick sort
     2.  merge sort
     3.  radix sort
     4.  bubble sort
     Correct Answer : 4
     
QuestionID  :  14189         Subject Name  C_CET
Q17. What keyword covers unhandled possibilities?
     1.  all
     2.  contingency
     3.  default
     4.  other
     Correct Answer : 3
     
QuestionID  :  14193         Subject Name  C_CET
Q18. Which of the following reads in a string named x with one hundred characters?
     1.  fgets(x, 101, stdin);
     2.  fgets(x, 100, stdin);
     3.  readline(x, 100, `\n`);
     4.  read(x);
     Correct Answer : 1
     
QuestionID  :  14229         Subject Name  C_CET
Q19. Which among the following is a unconditional control structure
     1.  do-while
     2.  if-else
     3.  goto
     4.  for
     Correct Answer : 3
     
QuestionID  :  14230         Subject Name  C_CET
Q20. The output of printf("%u", -1) is
     1.  -1
     2.  minimum int value
     3.  maximum int value
     4.  error message
     Correct Answer : 3
     
QuestionID  :  14237         Subject Name  C_CET
Q21. Pointers are of
     1.  integer data type
     2.  character data type
     3.  unsigned integer datatypes
     4.  none of these
     Correct Answer : 4
     
QuestionID  :  14238         Subject Name  C_CET
Q22. If the size of the array is less than the initializers then
     1.  extra values are being ignored
     2.  generates an error message
     3.  size of array is increased
     4.  size is neglected when values are given
     Correct Answer : 2
     
QuestionID  :  14300         Subject Name  C_CET
Q23. Header files in C contain
     1.  Compiler commands
     2.  Library functions
     3.  Header information of C programs
     4.  Operators for files
     Correct Answer : 2
     
QuestionID  :  14303         Subject Name  C_CET
Q24. Which of the following are tokens in C?
     1.  keywords
     2.  variables
     3.  constants
     4.  all of the above
     Correct Answer : 4
     
QuestionID  :  14306         Subject Name  C_CET
Q25. the meaning of conversion character for data input is
     1.  data item is a long integer
     2.  data item is an unsigned decimal integer
     3.  data item is short integer
     4.  none of the above
     Correct Answer : 3
     
QuestionID  :  14374         Subject Name  C_CET
Q26. void main( )
{
int i=107,x=5;
printf((x>7)?”%d”:”%c”,i);
}
     1.  compilation error
     2.  k
     3.  z
     4.  107
     Correct Answer : 2
     
QuestionID  :  14376         Subject Name  C_CET
Q27. If a=-11 and b=-3 what is the value of a%b?
     1.  2
     2.  -2
     3.  3
     4.  -3
     Correct Answer : 2
     
QuestionID  :  14431         Subject Name  C_CET
Q28. %p format specifier in printf is used to print the
     1.  value of int type variable
     2.  value of double type variable
     3.  address of a variable
     4.  value of long double variable
     Correct Answer : 1
     
QuestionID  :  14435         Subject Name  C_CET
Q29. The complete binary tree of height `n` has exactly --- elements.
     1.  n+1
     2.  2n+1
     3.  2^n+1
     4.  2^n-1
     Correct Answer : 4
     
QuestionID  :  14444         Subject Name  C_CET
Q30. If every non leaf node in a binary tree has nonempty left and right sub tree is termed as a ---- tree.
     1.  Balanced binary tree
     2.  right tree
     3.  strictly binary tree
     4.  non balanced tree
     Correct Answer : 3
     
QuestionID  :  14530         Subject Name  C_CET
Q31. int show(int v)
{
if(v= =1||v= =0)
return 1;
if(v % 2==0)
return show(v/2) +2;
else
return show(v-2) +3;
}
void main( )
{
int z;
z = show(7);
printf(“%d”,z);
}
     1.  11
     2.  5
     3.  10
     4.  infinite loop
     Correct Answer : 3
     
QuestionID  :  14534         Subject Name  C_CET
Q32. void main( )
{
int i=1;
while(i<=32767)
{
printf(“%d”,i);
i++;
}
}
     1.  infinite loop
     2.  1 2 .….32766
     3.  1 2…...32767
     4.  1 2…...32768
     Correct Answer : 1
     
QuestionID  :  14543         Subject Name  C_CET
Q33. Which of the following statements is true regarding recursive functions?
i. It is also called as a circular definition.
ii. It occurs when a function calls another function more than once.
iii. It occurs when a statement within the function calls the function itself.
iv. A recursive function cannot have a return statement within it.
     1.  i and iii
     2.  i and ii
     3.  ii and iv
     4.  i, iii and iv
     Correct Answer : 1
     
QuestionID  :  14545         Subject Name  C_CET
Q34. By default any real number in C is treated as
     1.  a float
     2.  a double
     3.  a long double
     4.  Depends on memory you are using
     Correct Answer : 2
     
QuestionID  :  14551         Subject Name  C_CET
Q35. On error ftell( ) returns
     1.  0
     2.  -1
     3.  -1L
     4.  0L
     Correct Answer : 3
     
QuestionID  :  14553         Subject Name  C_CET
Q36. The data structure that manages the activation record of a function is the 
     1.  Heap
     2.  Stack
     3.  Queue
     4.  Linked list
     Correct Answer : 2
     
QuestionID  :  14631         Subject Name  C_CET
Q37. What is the size of a file pointer?
     1.  4 Bytes
     2.  2 Bytes
     3.  We can’t determine the size of a file pointer.
     4.  The value returned by ftell() when the file pointer is at the end of the file.
     Correct Answer : 2
     
QuestionID  :  14632         Subject Name  C_CET
Q38. What will be the output?
void main()
{
int p=10,q=20;
clrscr();
printf("%5d%5d",p&q,p&&q);
getch();
}
     1.  0 0
     2.  0 1
     3.  1 0
     4.  1 1
     Correct Answer : 2
     
QuestionID  :  14635         Subject Name  C_CET
Q39. void main()
{
FILE *f1,*f2;
int troll,x;
char tname[20];
clrscr();
f1 = fopen("data.txt","w");
f2 = fopen("data.txt","r");
if (f2==0) {
printf("Error While Opening The File DATA.DAT");
exit(0);
}
while(1) {
printf("Enter Roll and Name : ");
scanf("%d %s",&troll,tname);
if(troll<=0) break;
fprintf(f1,"%d",troll);
}
clrscr();
while( fscanf(f2,"%d %s",&troll,tname)>0 )
printf("\n%5d%20s",troll,tname);
getch();
}
If input provided is as follows:
1 A
2 B
3 C
4 D
5 E
0 XX
,then what will be the output?
     1.  Same as that of input.
     2.  1 A
     3.  12345 XX
     4.  Blank Screen. i.e. No Output.
     Correct Answer : 3
     
QuestionID  :  14649         Subject Name  C_CET
Q40. void main()
{
enum code
{
add;
delete;
modify;
unchanged;
};
typedef enum code CODE;
CODE c,d;
c = add;
d = modify;
printf(“c = %d d = %d”,c,d);
}
     1.  c = 0 d = 0
     2.  c = 1 d = 3
     3.  c = 0 d = 2
     4.  c = garbage value d = garbage value
     Correct Answer : 3
     
QuestionID  :  14656         Subject Name  C_CET
Q41. What is true about strtok( ) function
     1.  returns a pointer to the first character of the first token in source
     2.  writes a null character into source immediately following the returned token.
     3.  Subsequent calls with null for the first argument will work through the
     4.  all of the above
     Correct Answer : 4
     
QuestionID  :  14660         Subject Name  C_CET
Q42. Which of the following functions are ideally suited for reading the contents of a file record by record?
     1.  getc( )
     2.  gets( )
     3.  fread( )
     4.  fgets( )
     Correct Answer : 3
     
QuestionID  :  15352         Subject Name  C_CET
Q43. main()
{
int 1,b;
int con;
1=b=2;
con (b==1) ? 1 : 0;
printf("%d",con);
} what will be the value of con?
     1.  0
     2.  1
     3.  Declaration error
     4.  2
     Correct Answer : 3
     
QuestionID  :  15430         Subject Name  C_CET
Q44. 1. main()
{
int c = 5;
printf("%d", main||c);
}
     1.  1
     2.  0
     3.  error
     4.  -1
     Correct Answer : 1
     
QuestionID  :  15434         Subject Name  C_CET
Q45. Give the output of the program
void main()
{
unsigned i=1; /* unsigned char k= -1 = > k=255; */
signed j=-1; /* char k= -1 = > k=65535 */
/* unsigned or signed int k= -1 = >k=65535 */
if(i < j)
printf("less");
else
if(i > j)
printf("greater");
else
if(i==j)
printf("equal");
}
     1.  less
     2.  greater
     3.  equal
     4.  None of the above
     Correct Answer : 1
     
QuestionID  :  15517         Subject Name  C_CET
Q46. void main()
{
struct { unsigned day:5;
unsigned month:4;
unsigned year:7;
}date;
date.day = 26;
date.month = 03;
date.year = 2001;
}
     1.  error: the structure is meaning less.
     2.  error: use = instead of colon in structure.
     3.  error: missing data type int from declarations.
     4.  will compile successfully.
     Correct Answer : 4
     
QuestionID  :  15519         Subject Name  C_CET
Q47. The expression arr[var] can be expressed as
     1.  arr + *var
     2.  &arr + var
     3.  * (arr+var)
     4.  arr + var
     Correct Answer : 3
     
QuestionID  :  15521         Subject Name  C_CET
Q48. When a string is passed by value to a function
     1.  works with a copy of string.
     2.  works with original address of a string.
     3.  cannot access the string.
     4.  cannot use a pointer to a string.
     Correct Answer : 2
     
QuestionID  :  15529         Subject Name  C_CET
Q49. Overflow refers to
     1.  a queue growing larger than array size.
     2.  front of queue is equal to back.
     3.  both option 1 and option 2 above.
     4.  none of the above.
     Correct Answer : 1
     
QuestionID  :  15548         Subject Name  C_CET
Q50. What do the function gcvt ( ) do?
     1.  Converts a string to an integer.
     2.  Converts an integer to a string
     3.  Converts a floating-point number to a string.
     4.  Converts a string to a floating-point number.
     Correct Answer : 3
     

QuestionID  :  13910         Subject Name  C_CET
Q1. Find the output
void main()
{
printf(”%d”);
}
     1.  garbage
     2.  -1
     3.  0
     4.  1
     Correct Answer : 3
      3
QuestionID  :  13914         Subject Name  C_CET
Q2. The operator ~ gives you ……..
     1.  2’s complement
     2.  1’s complement in 16 bits
     3.  1’s complement in 32 bits
     4.  1’s complement in 4 bits
     Correct Answer : 3
      4
QuestionID  :  13926         Subject Name  C_CET
Q3. Which of the following gives the memory address of a pointer a?
     1.  a
     2.  *a
     3.  &a
     4.  address(a)
     Correct Answer : 1
     
QuestionID  :  13977         Subject Name  C_CET
Q4. Will the following code work properly to fulfill the requirement of repositioning
the file pointer 50 bytes from the end of the file? Why ?

void main()
{
FILE *f;
f = fopen(“data.txt”, “r+” );
if (f = = 0)
{
printf(“Error In Opening The File.”);
exit(0);
}
fseek(f,0,2);
fseek(f,-50,1);
}
     1.  No, we can’t use fseek() in r+ mode.
     2.  No, fseek(f,0,2); should be replaced with fseek(f,-1,2);
     3.  Yes, it will fulfill our requirement.
     4.  No, fseek(f,-50,1); should be replaced with fseek(f,-50L,1);
     Correct Answer : 4
     
QuestionID  :  13978         Subject Name  C_CET
Q5. p++ executes faster than p+1 because
     1.  p uses registers
     2.  p++ is a single instruction
     3.  ++ is faster than +
     4.  None of these
     Correct Answer : 2
     
QuestionID  :  14017         Subject Name  C_CET
Q6. void main()
{
int goodluck(int,float);
int (*shine)(int,float);
shine = goodluck;
printf(“%d”,(*shine)(10,3.14));
}
int goodluck(int i,float f)
{
printf(“\n%d %f”,i,f);
return (4.56);
}
     1.  10 3.14 4.56
     2.  4 10 3.14
     3.  10 3.14 4
     4.  can‘t say
     Correct Answer : 3
     
QuestionID  :  14025         Subject Name  C_CET
Q7. void main()
{
void show();
void (*x)();
x= &show();
(*x)();
}
void show()
{
printf(“\nSunbeam Infotech”);
}
     1.  Sunbeam Infotech
     2.  Sunbeam
     3.  Sunbeam Infotech Sunbeam infotech
     4.  Compilation error
     Correct Answer : 4
     
QuestionID  :  14035         Subject Name  C_CET
Q8. void main()
{
while(4<5)
printf(“Hi!”);
}
     1.  Hi!
     2.  Hi! Infinite number of times
     3.  No output
     4.  invalid while condition
     Correct Answer : 2
     
QuestionID  :  14041         Subject Name  C_CET
Q9. void main()
{
char *buff;
buff = (char*)calloc(10);
printf(“Buff size = %d”,sizeof(buff));
}
     1.  2
     2.  10
     3.  20
     4.  none of the above
     Correct Answer : 1
     
QuestionID  :  14047         Subject Name  C_CET
Q10. C language is available for which of the following Operating Systems?
     1.  DOS
     2.  WINDOWS
     3.  UNIX
     4.  All of these
     Correct Answer : 4
     
QuestionID  :  14053         Subject Name  C_CET
Q11. Which is a valid typecast?
     1.  a(char);
     2.  char(a);
     3.  (char)a;
     4.  to(char,a);
     Correct Answer : 3
     
QuestionID  :  14056         Subject Name  C_CET
Q12. int main()
{
unsigned int i;
int j;
i=1;
for(j=0;j<2;j++)
{
i = i << 1;
printf(“%d ”,i);
}
for(j=0;j<2;j++)
{
i = i >> 1;
printf(“%d ”,i);
}
}
     1.  2 4
2 1
     2.  2 4
0 0
     3.  error
     4.  4 2
1 2
     Correct Answer : 1
     
QuestionID  :  14073         Subject Name  C_CET
Q13. void main()
{
char *s[] = {“Hello”,”Friends”};
char **point;
point = s;
printf(“%s”,++*point);
printf(“%s”,*point++);
printf(“%s”,++*point);
}
     1.  ello Hello Friends
     2.  ello Friends Hello
     3.  ello ello riends
     4.  ello ello Friends
     Correct Answer : 3
     
QuestionID  :  14123         Subject Name  C_CET
Q14. void main()
{
printf("Today \r is a\7 great \t\r\\day");
}
     1.  \day a great
     2.  today is a great day
     3.  \daya great
     4.  is a great \day
     Correct Answer : 3
     
QuestionID  :  14129         Subject Name  C_CET
Q15. struct node
{
int data;
struct node *llink;
struct node *rlink;
};
This structure can be used for
     1.  singly linked list
     2.  doubly linked list
     3.  doubly circular list
     4.  2 and 3 both
     Correct Answer : 4
     
QuestionID  :  14130         Subject Name  C_CET
Q16. Pointer of singly circular list with only one node will point to---
     1.  next node
     2.  previous node
     3.  same node
     4.  NULL
     Correct Answer : 3
     
QuestionID  :  14135         Subject Name  C_CET
Q17. void main( )
{
enum days{mon,tue,wed,sat,sun };
enum days d1,d2,d3;
d1 = mon + sun;
d2 = wed – sat;
d3 = sun * tue;
printf(“%d %d %d”,d1,d2,d3);
}
     1.  4 -1 4
     2.  1 5 5
     3.  0 4 4
     4.  compilation error
     Correct Answer : 1
     
QuestionID  :  14141         Subject Name  C_CET
Q18. Which of the following statements is true regarding functions?
     1.  Any C program contains at least one function
     2.  A function can be defined inside another function
     3.  In a C program there can be more than one function with the same name.
     4.  A C program can have Zero number of functions.
     Correct Answer : 1
     
QuestionID  :  14164         Subject Name  C_CET
Q19. What will be the output of the following:
main()
{
time_t t1,t2;
double diff,f;
int i=2;

time(&t1);
sleep(i);
time(&t2);

diff=difftime(t2,t1);
printf("%lf",diff);
}
     1.  2
     2.  1
     3.  0
     4.  Nothing
     Correct Answer : 1
     
QuestionID  :  14165         Subject Name  C_CET
Q20. Which of the following file opening modes would destroy the file being opened, if the file already exists on the disk?
i. “w”
ii. “wb”
iii. “wb+”
iv. “rb+”
v. “ab+”
     1.  i only
     2.  i, ii and iii
     3.  i and ii
     4.  i, ii, iii and v
     Correct Answer : 2
     
QuestionID  :  14187         Subject Name  C_CET
Q21. Which is not a proper prototype?
     1.  double funct(char x)
     2.  void funct();
     3.  int funct(char x, char y);
     4.  char x();
     Correct Answer : 1
     
QuestionID  :  14196         Subject Name  C_CET
Q22. the meaning of conversion character for data input is
     1.  data item is a long integer
     2.  data item is an unsigned decimal integer
     3.  data item is short integer
     4.  none of the above
     Correct Answer : 3
     
QuestionID  :  14220         Subject Name  C_CET
Q23. Which properly declares a variable of struct foo?
     1.  struct foo;
     2.  struct foo var;
     3.  foo;
     4.  int foo;
     Correct Answer : 2
     
QuestionID  :  14223         Subject Name  C_CET
Q24. The number of the relational operators in c language is
     1.  four
     2.  six
     3.  three
     4.  one
     Correct Answer : 2
     
QuestionID  :  14225         Subject Name  C_CET
Q25. In c, a union is
     1.  memory location
     2.  memory store
     3.  memory screen
     4.  none of these
     Correct Answer : 1
     
QuestionID  :  14306         Subject Name  C_CET
Q26. the meaning of conversion character for data input is
     1.  data item is a long integer
     2.  data item is an unsigned decimal integer
     3.  data item is short integer
     4.  none of the above
     Correct Answer : 3
     
QuestionID  :  14381         Subject Name  C_CET
Q27. Let`s say that you insert a new node between two existing nodes in a singly linked list. Which link pointers do you think require a new value?
i. The one after the new node
ii. The one belonging to a new node.
iii. The one before the new node and the one after the new node.
iv. The one before the new node.
     1.  i, ii and iv
     2.  ii and iv
     3.  i, ii and iii
     4.  i and iii
     Correct Answer : 2
     
QuestionID  :  14428         Subject Name  C_CET
Q28. void print(int *a, int *b, int *c, int *d, int *e,)
{
printf(“%d%d%d%d%d”,*a, *b, *c, *d, *e);
}
void main()
{
static int arr[] = {90,91,92,93,94,95,96,97};
int *ptr = arr+1;
print(++ptr, ptr--, ptr, ptr++, ++ptr);
}
     1.  97 96 95 94 93
     2.  93 93 93 93 92
     3.  90 91 92 93 94
     4.  93 93 93 92 92
     Correct Answer : 4
     
QuestionID  :  14436         Subject Name  C_CET
Q29. void main( )
{
int x,y=2,z,a;
x = (y*=2)+(z=a=y);
printf(“%d”,x);
}
     1.  compilation error
     2.  4
     3.  8
     4.  6
     Correct Answer : 3
     
QuestionID  :  14441         Subject Name  C_CET
Q30. ---sorting method is least efficient.
     1.  quick sort
     2.  merge sort
     3.  radix sort
     4.  bubble sort
     Correct Answer : 4
     
QuestionID  :  14442         Subject Name  C_CET
Q31. A sort which uses shifting technique is called -----.
     1.  insertion sort
     2.  selection sort
     3.  heap sort
     4.  quick sort
     Correct Answer : 1
     
QuestionID  :  14445         Subject Name  C_CET
Q32. In a tree element with no child is called as
     1.  node
     2.  leaf node
     3.  root node
     4.  none of the above
     Correct Answer : 2
     
QuestionID  :  14551         Subject Name  C_CET
Q33. On error ftell( ) returns
     1.  0
     2.  -1
     3.  -1L
     4.  0L
     Correct Answer : 3
     
QuestionID  :  14553         Subject Name  C_CET
Q34. The data structure that manages the activation record of a function is the 
     1.  Heap
     2.  Stack
     3.  Queue
     4.  Linked list
     Correct Answer : 2
     
QuestionID  :  14557         Subject Name  C_CET
Q35. Integer division in C program results in
     1.  truncation
     2.  rounding
     3.  overflow
     4.  none
     Correct Answer : 1
     
QuestionID  :  14603         Subject Name  C_CET
Q36. void main( )
{
struct s1
{
char *z;
int i;
struct s1 *p;
};
static struct s1 a[] = {{“Kerala”,6,a+2},{“Punjab”,5,a+1},{“Delhi”,4,a}};
struct s1 *ptr = a+1;
printf (“%s %s %s”, a[0].z, ptr->z, a[2].p->z);
}
     1.  Kerala Kerala Kerala
     2.  Kerala Punjab Delhi
     3.  Kerala Punjab Punjab
     4.  Kerala Punjab Kerala
     Correct Answer : 4
     
QuestionID  :  14606         Subject Name  C_CET
Q37. void main( )
{
printf(“Hello”);
char far *p = 0x417;
*p = 64;
printf(“%d”,p);
}
     1.  Hello 0
     2.  0 Hello
     3.  HELLO
     4.  compilation error
     Correct Answer : 4
     
QuestionID  :  14609         Subject Name  C_CET
Q38. void main( )
{
char far *cash, *cheque;
printf(“%d %d”,sizeof(cash),sizeof(cheque));
}
     1.  2 2
     2.  4 4
     3.  4 2
     4.  2 4
     Correct Answer : 3
     
QuestionID  :  14612         Subject Name  C_CET
Q39. What is the output of the following progamme?
void main()
{
int **p,*q,r=100;
clrscr();
p = (int**)malloc(sizeof(int*));
q = (int*)malloc(sizeof(int));
printf(“%5d%5d%5d%5d%5d%5d”,sizeof(p),sizeof(*p),sizeof(q), sizeof(*q),   sizeof(r),sizeof(**p));
getch();
}
     1.  2 2 2 2 2 2
     2.  4 2 2 2 2 2
     3.  Run time error.
     4.  Compile time error.
     Correct Answer : 1
     
QuestionID  :  14629         Subject Name  C_CET
Q40. void main()
{
FILE *f1,*f2;
int troll,x;
char tname[20];
clrscr();
f1 = fopen("data.txt","w");
f2 = fopen("data.txt","r");
if (f2==0) {
printf("Error While Opening The File DATA.DAT");
exit(0);
}
while(1) {
printf("Enter Roll and Name : ");
scanf("%d %s",&troll,tname);
if(troll<=0) break;
fprintf(f1,"%d %s ",troll,tname);
}
clrscr();
while( fscanf(f2,"%d %s",&troll,tname)>0 )
printf("\n%5d%20s",troll,tname);
getch();
}

If input provided is as follows:
1 A
2 B
3 C
4 D
5 E
0 XX
,then what will be the output?
     1.  1 A
2 B
3 C
4 D
5 E
     2.  Compile time error
     3.  Run time error.
     4.  No Output i.e. blank screen
     Correct Answer : 4
     
QuestionID  :  14649         Subject Name  C_CET
Q41. void main()
{
enum code
{
add;
delete;
modify;
unchanged;
};
typedef enum code CODE;
CODE c,d;
c = add;
d = modify;
printf(“c = %d d = %d”,c,d);
}
     1.  c = 0 d = 0
     2.  c = 1 d = 3
     3.  c = 0 d = 2
     4.  c = garbage value d = garbage value
     Correct Answer : 3
     
QuestionID  :  14655         Subject Name  C_CET
Q42. 1. What will be the output of the following code
main()
{
char str1[]="Banglore-440010";
char str2[15];
strcpy(str2,"Pune ");
strncat(str2,str1,8);
printf("%s",str2);
}
     1.  Pune Banglore-440010
     2.  Pune Banglore
     3.  Banglore
     4.  Pune Ban
     Correct Answer : 2
     
QuestionID  :  14659         Subject Name  C_CET
Q43. void main( )
{
int a=3,b=2,c=1,d;
d = a | b & c;
printf(“%d ”,d);
d = a | b & ~c;
printf(“%d ”,d);
}
     1.  3 3
     2.  1 2
     3.  1 3
     4.  3 2
     Correct Answer : 1
     
QuestionID  :  15347         Subject Name  C_CET
Q44. How would you dynamically allocate a 2-D arrays of 3 rows and 4 columns such that we are able to access any element using 2 subscripts, as in arr[i][j]? Also the rows of the array should be stored in adjacent memory locations.
     1.  int **p, i ,j;
p=(int **) malloc(3 *sizeof(int *));
for(i=0; i<3; i++)
p[i]=p[0] + i * 4
     2.  int **p, i ,j;
p=(int **) malloc(3 * 4 * sizeof(int *));
     3.  int *p= (int **) malloc(3 * 4 * sizeof(int *));
     4.  int *p= (int *) malloc(3 * 4 * sizeof(int *));
     Correct Answer : 1
     
QuestionID  :  15514         Subject Name  C_CET
Q45. What does the following means?
char *ptr = new char [2];
     1.  memory for two char will get allocated.
     2.  compilation error.
     3.  memory for one variable will get allocated.
     4.  None of the above.
     Correct Answer : 1
     
QuestionID  :  15517         Subject Name  C_CET
Q46. void main()
{
struct { unsigned day:5;
unsigned month:4;
unsigned year:7;
}date;
date.day = 26;
date.month = 03;
date.year = 2001;
}
     1.  error: the structure is meaning less.
     2.  error: use = instead of colon in structure.
     3.  error: missing data type int from declarations.
     4.  will compile successfully.
     Correct Answer : 4
     
QuestionID  :  15529         Subject Name  C_CET
Q47. Overflow refers to
     1.  a queue growing larger than array size.
     2.  front of queue is equal to back.
     3.  both option 1 and option 2 above.
     4.  none of the above.
     Correct Answer : 1
     
QuestionID  :  15547         Subject Name  C_CET
Q48. What do the function itoa ( ) do?
     1.  Converts a string to an integer.
     2.  Converts an integer to a string
     3.  Converts a floating-point number to a string.
     4.  Converts a string to a floating-point number.
     Correct Answer : 2
     
QuestionID  :  15549         Subject Name  C_CET
Q49. The function which can be used to convert an integer or a float to a string is
     1.  fprintf
     2.  sprintf
     3.  cprintf
     4.  printf
     Correct Answer : 2
     
QuestionID  :  15552         Subject Name  C_CET
Q50. pow( ) function is present in ---- .
     1.  stdlib.h
     2.  stdio.h
     3.  complex.h
     4.  conio.h
     Correct Answer : 3
     

QuestionID  :  13912         Subject Name  C_CET
Q1. ## in ‘C’ language represents …..
     1.  There is nothing like ## in ‘C’ language
     2.  It indicates starting of the directive
     3.  Token-Pasting Operator
     4.  Starting of a macro code
     Correct Answer : 3
      0
QuestionID  :  13913         Subject Name  C_CET
Q2. What will be the output ?

void main()
{
int cnt;
extern int tmparray[5];
clrscr();
for(cnt=0;cnt<5;cnt++)
printf(“%5d”,tmparray[cnt]);
}
int tmparray[5];
     1.  5 garbage values
     2.  Compile time error
     3.  Run time error
     4.  0 0 0 0 0
     Correct Answer : 4
     
QuestionID  :  13915         Subject Name  C_CET
Q3. What will be the output ?
void main()
{
char str[] = “Hello Everybody”;
clrscr();
printf(“%5s”,str);
getch();
}
     1.  Hello
     2.  Garbage
     3.  Hello Everybody
     4.  compile time error
     Correct Answer : 3
     
QuestionID  :  13919         Subject Name  C_CET
Q4. A null pointer is an un-initialized pointer?
     Correct Answer : T
     
QuestionID  :  13924         Subject Name  C_CET
Q5. Identify the wrong statement
     1.  putchar(65)
     2.  putchar(`x`)
     3.  putchar("x")
     4.  putchar(`\n`)
     Correct Answer : 3
     
QuestionID  :  13963         Subject Name  C_CET
Q6. #include < stdarg.h >
main()
{
varfiun(3,7,-11,0);
}
varfun(int n,…)
{
va_list ptr;
int num;
num = va_arg(ptr,int);
printf(“\n%d”,num);
}
     1.  3
     2.  garbage value
     3.  7
     4.  0
     Correct Answer : 2
     
QuestionID  :  13966         Subject Name  C_CET
Q7. What would be output of the following program
main()
{
printf(5+”Sunbeam Infotech”);
}
     1.  am Infotech
     2.  Sunbeam Infotech
     3.  error
     4.  none of the above
     Correct Answer : 1
     
QuestionID  :  13967         Subject Name  C_CET
Q8. find the output
#include< alloc.h >
#define MAXROW 3
#define MAXCOL 4
main()
{
int (*p)[MAXCOL];
p = (int(*)[MAXCOL])malloc(MAXROW * sizeof(*p));
printf(“%d %d”,sizeof(p),sizeof(*p));

}
     1.  24 2
     2.  2 12
     3.  2 8
     4.  24 8
     Correct Answer : 3
     
QuestionID  :  13968         Subject Name  C_CET
Q9. What would be output of the following program
main()
{
char str1[] = “Hello”;
char str2[] = “Hello”;
if(str1 == atr2)
printf(“\nEqual”);
else
printf(“\nUnequal”);
}
     1.  Equal
     2.  Unequal
     3.  Error
     4.  none of the above
     Correct Answer : 2
     
QuestionID  :  13969         Subject Name  C_CET
Q10. Operators have hierarchy. It is used to know which operator
     1.  is most important
     2.  is used first
     3.  is faster
     4.  operates on large numbers
     Correct Answer : 2
     
QuestionID  :  13970         Subject Name  C_CET
Q11. The bitwise AND operator is used for
     1.  Masking
     2.  Comparison
     3.  Division
     4.  Shifting bits
     Correct Answer : 1
     
QuestionID  :  13971         Subject Name  C_CET
Q12. The bitwise OR operator is used to
     1.  set the desired bits to 1
     2.  set the desired bits to 0
     3.  divide numbers
     4.  multiply numbers
     Correct Answer : 1
     
QuestionID  :  13972         Subject Name  C_CET
Q13. The associativity of ! operator is
     1.  Right to Left
     2.  Left to Right
     3.  (a) for Arithmetic and (b) for Relational
     4.  (a) for Relational and (b) for Arithmetic
     Correct Answer : 1
     
QuestionID  :  13973         Subject Name  C_CET
Q14. What will be the output of the expression 11 ^ 5
     1.  5
     2.  6
     3.  11
     4.  none of the above
     Correct Answer : 4
     
QuestionID  :  13974         Subject Name  C_CET
Q15. The macro va_start is used to initialize a pointer to the beginning of the list of fixed arguments
     Correct Answer : F
     
QuestionID  :  13975         Subject Name  C_CET
Q16. Which header file should you include if you are to develop a function which can accept variable number of arguments?
     1.  vararg.h
     2.  stdlib.h
     3.  stdio.h
     4.  stdarg.h
     Correct Answer : 4
     
QuestionID  :  13989         Subject Name  C_CET
Q17. main()
{
unsigned int a = 0xffff;
~a;
printf("%x",a);
}
     1.  ffff
     2.  0000
     3.  00ff
     4.  none of the above
     Correct Answer : 1
     
QuestionID  :  14025         Subject Name  C_CET
Q18. void main()
{
void show();
void (*x)();
x= &show();
(*x)();
}
void show()
{
printf(“\nSunbeam Infotech”);
}
     1.  Sunbeam Infotech
     2.  Sunbeam
     3.  Sunbeam Infotech Sunbeam infotech
     4.  Compilation error
     Correct Answer : 4
     
QuestionID  :  14031         Subject Name  C_CET
Q19. void main()
{
int i;
printf(“%d”,i^i);
}
     1.  1
     2.  0
     3.  Unexpected
     4.  runtime error
     Correct Answer : 2
     
QuestionID  :  14038         Subject Name  C_CET
Q20. void main(argc,argv)
{
int argc;
char *argv[10];
printf(“hello”);
}
     1.  hello
     2.  multiple declaration
     3.  runtime error
     4.  unknown size error
     Correct Answer : 2
     
QuestionID  :  14040         Subject Name  C_CET
Q21. void main()
{
int i =20,j=30;
i ^ = j;
j ^ = i;
i ^ = j;
printf(“%d %d”,i,j);
}
     1.  20 20
     2.  20 30
     3.  30 30
     4.  30 20
     Correct Answer : 4
     
QuestionID  :  14049         Subject Name  C_CET
Q22. The continue command cannot be used with
     1.  for
     2.  switch
     3.  do
     4.  while
     Correct Answer : 2
     
QuestionID  :  14050         Subject Name  C_CET
Q23. In what order do the two command line variables appear in the definition of main?
     1.  Count then argument array
     2.  Argument array then count
     3.  They do not appear in the definition of main
     4.  There is only one argument.
     Correct Answer : 1
     
QuestionID  :  14054         Subject Name  C_CET
Q24. Which of the following is false?
     1.  1
     2.  -1
     3.  .1
     4.  none of the above
     Correct Answer : 4
     
QuestionID  :  14055         Subject Name  C_CET
Q25. Evaluate !(1 && !(0 || 1))
     Correct Answer : T
     
QuestionID  :  14073         Subject Name  C_CET
Q26. void main()
{
char *s[] = {“Hello”,”Friends”};
char **point;
point = s;
printf(“%s”,++*point);
printf(“%s”,*point++);
printf(“%s”,++*point);
}
     1.  ello Hello Friends
     2.  ello Friends Hello
     3.  ello ello riends
     4.  ello ello Friends
     Correct Answer : 3
     
QuestionID  :  14114         Subject Name  C_CET
Q27. --- is a efficient data structure for flexible data storage
     1.  static array
     2.  linked list
     3.  structure
     4.  queue
     Correct Answer : 2
     
QuestionID  :  14116         Subject Name  C_CET
Q28. struct temp
{
int a;
struct temp no_roll;
double c;
}obj;
     1.  Underscore cannot be used in variable declaration.
     2.  it will be compiled successfully.
     3.  obj must be a pointer to struct
     4.  error: struct variables cannot be included in its own structure
     Correct Answer : 4
     
QuestionID  :  14117         Subject Name  C_CET
Q29. Let sizeof(int) = 4 and sizeof(long) = 8
What will be the sizeof(struct SUN);
Struct SUN
{
int XML[2];
union
{
char ITS[7];
int practice;
}student;
long VB;
char Java;
};
     1.  32
     2.  28
     3.  24
     4.  system dependent
     Correct Answer : 3
     
QuestionID  :  14122         Subject Name  C_CET
Q30. void main( )
{
int i,fun1( ),fun2,fun3;
int ( *f[3] )( );
f[0] = fun1;
f[1] = fun2;
f[2] = fun3;
for(i=0;i<3;i++)
( *f[i] )( );
}
fun1( )
{
printf(“SUNBEAM”);
fun2( );
}
fun2( )
{
printf(“INFOTECH”);
}
fun3( )
{
printf(“MARKET YARD”);
}
     1.  SUNBEAM INFOTECH MARKET YARD
     2.  SUNBEAM INFOTECH MARKET YARD
     3.  SUNBEAM INFOTECH INFOTECH MARKET YARD
     4.  Error: Invalid pointer assignment
     Correct Answer : 3
     
QuestionID  :  14125         Subject Name  C_CET
Q31. Recursion technique uses data structure
     1.  stack
     2.  queue
     3.  heap
     4.  linked list
     Correct Answer : 1
     
QuestionID  :  14126         Subject Name  C_CET
Q32. When a liner queue said to be empty?
     1.  front = rear
     2.  front = rear-1
     3.  front = rear+1
     4.  rear = front + 1
     Correct Answer : 1
     
QuestionID  :  14129         Subject Name  C_CET
Q33. struct node
{
int data;
struct node *llink;
struct node *rlink;
};
This structure can be used for
     1.  singly linked list
     2.  doubly linked list
     3.  doubly circular list
     4.  2 and 3 both
     Correct Answer : 4
     
QuestionID  :  14130         Subject Name  C_CET
Q34. Pointer of singly circular list with only one node will point to---
     1.  next node
     2.  previous node
     3.  same node
     4.  NULL
     Correct Answer : 3
     
QuestionID  :  14133         Subject Name  C_CET
Q35. What do you think is true about queue data structure?
i. it is a LILO data structure
ii. elements from queue are deleted from the rear end
iii. we can design a circular queue
     1.  i and ii
     2.  i and iii
     3.  i, ii and iii
     4.  i only
     Correct Answer : 2
     
QuestionID  :  14138         Subject Name  C_CET
Q36. enum records{one,two=4,three,four=4};
void main( )
{
printf(“%d %d %d %d”, one,two,three,four);
}
     1.  0 4 5 4
     2.  1 4 3 4
     3.  1 4 5 4
     4.  0 4 3 4
     Correct Answer : 1
     
QuestionID  :  14141         Subject Name  C_CET
Q37. Which of the following statements is true regarding functions?
     1.  Any C program contains at least one function
     2.  A function can be defined inside another function
     3.  In a C program there can be more than one function with the same name.
     4.  A C program can have Zero number of functions.
     Correct Answer : 1
     
QuestionID  :  14150         Subject Name  C_CET
Q38. There can not be circular
     1.  singly linked list
     2.  queue
     3.  stack
     4.  tree
     Correct Answer : 3
     
QuestionID  :  14151         Subject Name  C_CET
Q39. Efficiency of sorting method depends on
     1.  programming time
     2.  execution time
     3.  memory or auxiliary space required for the program
     4.  algorithm
     Correct Answer : 4
     
QuestionID  :  14153         Subject Name  C_CET
Q40. void main( )
{
int a[] = {1,2,3,4,5},j;
for(j=0;j<5;j++)
{
printf(“%d”,a[j]);
a++;
}
}
     1.  1 2 3 4 5
     2.  1 3 5
     3.  1 2 3 4
     4.  compilation error
     Correct Answer : 4
     
QuestionID  :  14154         Subject Name  C_CET
Q41. void main( )
{
struct node
{
int data;
struct *link;
};
struct node node1,node2;
*node1 = malloc(sizeof(struct node));
*node2 = malloc(sizeof(struct node));
node1->data = 30;
node1->link = node2;
node2->data = 40;
node2->link = NULL;
printf(“\n%d”,node1->data);
node1 = node2->link;
printf(“%d”,node1->data);
}
     1.  30 40
     2.  40 30
     3.  30 0
     4.  error: Illegal structure operation in main
     Correct Answer : 4
     
QuestionID  :  14165         Subject Name  C_CET
Q42. Which of the following file opening modes would destroy the file being opened, if the file already exists on the disk?
i. “w”
ii. “wb”
iii. “wb+”
iv. “rb+”
v. “ab+”
     1.  i only
     2.  i, ii and iii
     3.  i and ii
     4.  i, ii, iii and v
     Correct Answer : 2
     
QuestionID  :  14188         Subject Name  C_CET
Q43. Which of the following is a complete function?
     1.  int funct();
     2.  int funct(int x) {return x=x+1;}
     3.  void funct(int) { printf( "Hello");
     4.  void funct(x) { printf( "Hello"); }
     Correct Answer : 2
     
QuestionID  :  14190         Subject Name  C_CET
Q44. Which of the following gives the memory address of a pointer a?
     1.  a
     2.  *a
     3.  &a
     4.  address(a)
     Correct Answer : 1
     
QuestionID  :  14192         Subject Name  C_CET
Q45. Which of the following gives the memory address of the first element in array foo, an array
with 100 elements?
     1.  foo[0]
     2.  foo
     3.  &foo
     4.  foo[1]
     Correct Answer : 2
     
QuestionID  :  14193         Subject Name  C_CET
Q46. Which of the following reads in a string named x with one hundred characters?
     1.  fgets(x, 101, stdin);
     2.  fgets(x, 100, stdin);
     3.  readline(x, 100, `\n`);
     4.  read(x);
     Correct Answer : 1
     
QuestionID  :  14195         Subject Name  C_CET
Q47. find the output:
void sp_to_dash(const char *str);
int main(void)
{
sp_to_dash(“This is a test”);
return 0;
}
void sp_to_dash(const char *str)
{
while(*str)
{
if(*str==’ ‘) *str = ‘-‘;
printf(“%c”,*str);
str++;
} }
     1.  This-is-a-test
     2.  Error message
     3.  This is a test
     4.  None of the above
     Correct Answer : 2
     
QuestionID  :  14196         Subject Name  C_CET
Q48. the meaning of conversion character for data input is
     1.  data item is a long integer
     2.  data item is an unsigned decimal integer
     3.  data item is short integer
     4.  none of the above
     Correct Answer : 3
     
QuestionID  :  14210         Subject Name  C_CET
Q49. Which is a good use for typecasting?
     1.  To allow division of two integers to return a decimal value.
     2.  To allow your program to use nothing but integers.
     3.  To change the return type of a function.
     4.  To swap variables rapidly.
     Correct Answer : 1
     
QuestionID  :  14218         Subject Name  C_CET
Q50. Which of the following is a properly defined struct?
     1.  struct {int a;}
     2.  struct a_struct {int a;}
     3.  struct a_struct int a;
     4.  struct a_struct {int a;};
     Correct Answer : 4
     
QuestionID  :  14233         Subject Name  C_CET
Q51. The printf() function retunes which value when an error occurs?
     1.  Positive value
     2.  zero
     3.  negative value
     4.  none of these
     Correct Answer : 3
     
QuestionID  :  14299         Subject Name  C_CET
Q52. A structure
     1.  can be read as a single entity
     2.  cannot be read as a single entity
     3.  can be displayed as a single entity
     4.  has member variables that cannot be read individually
     Correct Answer : 2
     
QuestionID  :  14301         Subject Name  C_CET
Q53. Which of the following is a Scalar Data type
     1.  float
     2.  union
     3.  array
     4.  pointer
     Correct Answer : 1
     
QuestionID  :  14303         Subject Name  C_CET
Q54. Which of the following are tokens in C?
     1.  keywords
     2.  variables
     3.  constants
     4.  all of the above
     Correct Answer : 4
     
QuestionID  :  14307         Subject Name  C_CET
Q55. Identify the invalid pointer arithmetic
     1.  Addition of float value to a pointer
     2.  Comparison of pointers that do not point to the element of the same array
     3.  Subtracting an integer from a pointer
     4.  Assigning the value 0 to a pointer variable
     Correct Answer : 1
     
QuestionID  :  14367         Subject Name  C_CET
Q56. void main( )
{
int i=0,j;
j = ++i+i++/i+i--;
printf(“%d”,j);
}
     1.  4
     2.  5
     3.  garbage
     4.  3
     Correct Answer : 4
     
QuestionID  :  14369         Subject Name  C_CET
Q57. void main( )
{
int red=0,pink;
pink =~red;
printf(“%d”,pink);
}
     1.  -32768
     2.  -1
     3.  1111
     4.  compilation error
     Correct Answer : 2
     
QuestionID  :  14375         Subject Name  C_CET
Q58. void main( )
{
int a=10,b;
b = a<<2;
printf(“%d”,b);
}
     1.  2
     2.  20
     3.  40
     4.  5
     Correct Answer : 3
     
QuestionID  :  14430         Subject Name  C_CET
Q59. Which of the following statement provides exit-controlled looping?
     1.  while statement
     2.  do-while statement
     3.  for statement
     4.  goto statement
     Correct Answer : 4
     
QuestionID  :  14432         Subject Name  C_CET
Q60. The queue implemented with a linked list keeping track of a front pointer and a rear pointer. Which of these pointers will change during an insertion into a NONEMPTY queue?
     1.  Neither changes
     2.  Only front ptr changes
     3.  Only rear ptr changes
     4.  Both changes
     Correct Answer : 3
     
QuestionID  :  14433         Subject Name  C_CET
Q61. void **p will be incremented by how many bytes?
     1.  1
     2.  2
     3.  0
     4.  4
     Correct Answer : 2
     
QuestionID  :  14434         Subject Name  C_CET
Q62. The degree of a leaf node in a general tree is
     1.  0
     2.  -1
     3.  1
     4.  can not say
     Correct Answer : 1
     
QuestionID  :  14435         Subject Name  C_CET
Q63. The complete binary tree of height `n` has exactly --- elements.
     1.  n+1
     2.  2n+1
     3.  2^n+1
     4.  2^n-1
     Correct Answer : 4
     
QuestionID  :  14439         Subject Name  C_CET
Q64. A--- sort is one in which successive elements are chosen in order and placed into their proper sorted position.
     1.  bubble
     2.  selection
     3.  radix
     4.  shell
     Correct Answer : 2
     
QuestionID  :  14440         Subject Name  C_CET
Q65. Which can be used as an external sorting method.
     1.  Bubble sort
     2.  Insertion sort
     3.  Merge sort
     4.  Selection sort
     Correct Answer : 3
     
QuestionID  :  14441         Subject Name  C_CET
Q66. ---sorting method is least efficient.
     1.  quick sort
     2.  merge sort
     3.  radix sort
     4.  bubble sort
     Correct Answer : 4
     
QuestionID  :  14443         Subject Name  C_CET
Q67. Which of the following sorting methods have highest memory complexity?
     1.  Bubble sort
     2.  Insertion sort
     3.  Quick sort
     4.  Merge sort
     Correct Answer : 4
     
QuestionID  :  14446         Subject Name  C_CET
Q68. In a singly linked list, if a new node is to be inserted between two consecutive nodes how many links have to be modified?
     1.  1
     2.  2
     3.  3
     4.  4
     Correct Answer : 2
     
QuestionID  :  14530         Subject Name  C_CET
Q69. int show(int v)
{
if(v= =1||v= =0)
return 1;
if(v % 2==0)
return show(v/2) +2;
else
return show(v-2) +3;
}
void main( )
{
int z;
z = show(7);
printf(“%d”,z);
}
     1.  11
     2.  5
     3.  10
     4.  infinite loop
     Correct Answer : 3
     
QuestionID  :  14535         Subject Name  C_CET
Q70. There can not be circular
     1.  Singly linked list
     2.  Queue
     3.  Stack
     4.  Tree
     Correct Answer : 3
     
QuestionID  :  14536         Subject Name  C_CET
Q71. void main( )
{
display( ); }
void display( )
{
printf(“Hello”);
}
     1.  Hello
     2.  Error: `display( )` should have a prototype
     3.  Error: type mismatch in redeclaration of `display( )`
     4.  both b and c
     Correct Answer : 3
     
QuestionID  :  14541         Subject Name  C_CET
Q72. In case of a linked list
     1.  arrays are used to hold the list
     2.  every link node has a link to the next node
     3.  links have array of pointer to next link
     4.  all of the above
     Correct Answer : 2
     
QuestionID  :  14553         Subject Name  C_CET
Q73. The data structure that manages the activation record of a function is the 
     1.  Heap
     2.  Stack
     3.  Queue
     4.  Linked list
     Correct Answer : 2
     
QuestionID  :  14555         Subject Name  C_CET
Q74. Associativity of unary minus is
     1.  right to left
     2.  left to right
     3.  any direction
     4.  none of the above
     Correct Answer : 1
     
QuestionID  :  14604         Subject Name  C_CET
Q75. void main( )
{
struct a
{
int i;
char ch;
};
struct a var1 = {10,`A`}, var2 = {50,`Z`};
char *ptr;
ptr = (char *)&var1;
var2 = var1;
printf(“%d %c”,var2.i,var2.ch);
}
     1.  50 Z
     2.  garbage values
     3.  10 A
     4.  compilation error
     Correct Answer : 3
     
QuestionID  :  14607         Subject Name  C_CET
Q76. void main( )
{
char *p = “Happy Birthday”;
char *s, *t;
t = malloc(sizeof(char *));
s = p;
while(*s)
t++ = s++;
printf(“%s”,t);
}
     1.  Garbage
     2.  Happy Birthday
     3.  No output
     4.  Error: Lvalue Required in main
     Correct Answer : 4
     
QuestionID  :  14608         Subject Name  C_CET
Q77. void main( )
{
struct num1
{
char ch[7];
char *s;
};
struct num2
{
char *c;
struct num1 s1;
};
static struct num2 s2 = {“apple”,”orange”,”lemon”};
printf(“%s %s”,s2.c,s2.s1.s);
printf(“%s %s”,s2.c++,++s2.s1.s);
}
     1.  apple lemon orange
     2.  apple lemon apple orange
     3.  apple lemon pple emon
     4.  apple lemon apple emon
     Correct Answer : 4
     
QuestionID  :  14612         Subject Name  C_CET
Q78. What is the output of the following progamme?
void main()
{
int **p,*q,r=100;
clrscr();
p = (int**)malloc(sizeof(int*));
q = (int*)malloc(sizeof(int));
printf(“%5d%5d%5d%5d%5d%5d”,sizeof(p),sizeof(*p),sizeof(q), sizeof(*q),   sizeof(r),sizeof(**p));
getch();
}
     1.  2 2 2 2 2 2
     2.  4 2 2 2 2 2
     3.  Run time error.
     4.  Compile time error.
     Correct Answer : 1
     
QuestionID  :  14613         Subject Name  C_CET
Q79. What is the correct sytanx for allocating memory for a 2-D pointer?
int **p,*q,r=100;
     1.  P = (int*)malloc(sizeof(int*));
     2.  P = (int*)malloc(sizeof(int**));
     3.  P = (int**)malloc(sizeof(int*));
     4.  None of the above
     Correct Answer : 3
     
QuestionID  :  14628         Subject Name  C_CET
Q80. What will be the output?
void main()
{
struct student
{
int roll;
char name[20];
}*p;
clrscr();
p = (struct student*)malloc(sizeof(struct student));
printf("Enter Roll : ");
scanf("%d",&p->roll); /* Assume 14 as input */
printf("Enter Name : "); /* Assume Shital as input */
scanf("%s",&p->name);
printf("%5d%20s",p->roll,p->name);
getch();
}
     1.  14 Shital
     2.  14 Garbage
     3.  Compiler dependent
     4.  Run time error.
     Correct Answer : 1
     
QuestionID  :  14632         Subject Name  C_CET
Q81. What will be the output?
void main()
{
int p=10,q=20;
clrscr();
printf("%5d%5d",p&q,p&&q);
getch();
}
     1.  0 0
     2.  0 1
     3.  1 0
     4.  1 1
     Correct Answer : 2
     
QuestionID  :  14633         Subject Name  C_CET
Q82. void main( )
{
struct num
{
unsigned bit0:1;
unsigned bit1:1;
unsigned bit2:1;
unsigned rest:5;
};
union a
{
struct num n;
char ch;
}b;
b.ch=32;
printf(“%d %d %d %d”,b.n.bit0, b.n.bit1, b.n.bit2, b.n.rest);
}
     1.  error
     2.  1 1 1 5
     3.  0 0 0 4
     4.  no output
     Correct Answer : 3
     
QuestionID  :  14634         Subject Name  C_CET
Q83. void main()
{
FILE *f1,*f2;
int troll,x;
char tname[20];
clrscr();
f1 = fopen("data.txt","w");
f2 = fopen("data.txt","r");
f1 = f2;
if (f2==0) {
printf("Error While Opening The File DATA.DAT");
exit(0);
}
while(1) {
printf("Enter Roll and Name : ");
scanf("%d %s",&troll,tname);
if(troll<=0) break;
fprintf(f1,"%d %s ",troll,tname);
}
fclose(f1);
while( fscanf(f2,"%d %s",&troll,tname)>0 )
printf("\n%5d%20s",troll,tname);
}
If input provided is as follows:
1 A
2 B
3 C
4 D
5 E
0 XX
,then what will be the output?
     1.  Same as that of input provided.
     2.  Run time error.
     3.  No Ouput. i.e. Blank Screen.
     4.  Infinite execution of a programme.
     Correct Answer : 3
     
QuestionID  :  14648         Subject Name  C_CET
Q84. void main( )
{
printf(“%f”,(float)((int)((float)((int)6.5/2+3.5))-3.5));
}
     1.  2
     2.  3.500000
     3.  2.500000
     4.  3.5
     Correct Answer : 3
     
QuestionID  :  14650         Subject Name  C_CET
Q85. void main()
{
int i=+1;
while(~i)
printf(“Sunbeam”);

}
     1.  Sunbeam…. printfed only once
     2.  no output
     3.  Sunbeam … printed twice
     4.  Sunbeam … printed infinite no of times
     Correct Answer : 4
     
QuestionID  :  15346         Subject Name  C_CET
Q86. If we use following printf(“%d”,num); to print a long int we will get warning message.
     Correct Answer : F
     
QuestionID  :  15347         Subject Name  C_CET
Q87. How would you dynamically allocate a 2-D arrays of 3 rows and 4 columns such that we are able to access any element using 2 subscripts, as in arr[i][j]? Also the rows of the array should be stored in adjacent memory locations.
     1.  int **p, i ,j;
p=(int **) malloc(3 *sizeof(int *));
for(i=0; i<3; i++)
p[i]=p[0] + i * 4
     2.  int **p, i ,j;
p=(int **) malloc(3 * 4 * sizeof(int *));
     3.  int *p= (int **) malloc(3 * 4 * sizeof(int *));
     4.  int *p= (int *) malloc(3 * 4 * sizeof(int *));
     Correct Answer : 1
     
QuestionID  :  15348         Subject Name  C_CET
Q88. What is true calloc() about function?
     1.  calloc() will set each element with a value 0.
     2.  calloc() needs two arguments number of elements and size of each element.
     3.  Option a & b is true.
     4.  None of the above.
     Correct Answer : 3
     
QuestionID  :  15350         Subject Name  C_CET
Q89. How much maximum memory can we allocate in a single call to malloc( )?
     1.  128 KB
     2.  64KB
     3.  164KB
     4.  1GB
     Correct Answer : 2
     
QuestionID  :  15352         Subject Name  C_CET
Q90. main()
{
int 1,b;
int con;
1=b=2;
con (b==1) ? 1 : 0;
printf("%d",con);
} what will be the value of con?
     1.  0
     2.  1
     3.  Declaration error
     4.  2
     Correct Answer : 3
     
QuestionID  :  15432         Subject Name  C_CET
Q91. What will be the output of the following program
void main(void)
{
unsigned int c;
unsigned x=0x3;
scanf("%u",&c);
switch(c&x)
{
case 3: printf("Hello!t");
case 2: printf("Welcomet");
case 1: printf("To Allt");
default:printf("n");
}
     1.  Hello!t
     2.  Hello!tWelcomet
     3.  Hello!tWelcometTo Allt
     4.  Non of the above
     Correct Answer : 4
     
QuestionID  :  15434         Subject Name  C_CET
Q92. Give the output of the program
void main()
{
unsigned i=1; /* unsigned char k= -1 = > k=255; */
signed j=-1; /* char k= -1 = > k=65535 */
/* unsigned or signed int k= -1 = >k=65535 */
if(i < j)
printf("less");
else
if(i > j)
printf("greater");
else
if(i==j)
printf("equal");
}
     1.  less
     2.  greater
     3.  equal
     4.  None of the above
     Correct Answer : 1
     
QuestionID  :  15435         Subject Name  C_CET
Q93. main()

{
int y = 7;
int x;
clrscr();
y+=x++;
printf("%d",y);
}
     1.  Undetermined value
     2.  8
     3.  Illegal Assignment
     4.  7
     Correct Answer : 1
     
QuestionID  :  15436         Subject Name  C_CET
Q94. What is wrong with this?
main(){
int *ptr;
*ptr=10;
}
     1.  Incorrect assignment
     2.  incorrect and will not compile
     3.  10
     4.  This program compiles fine. But, has unpredictable behaviour at run time
     Correct Answer : 4
     
QuestionID  :  15521         Subject Name  C_CET
Q95. When a string is passed by value to a function
     1.  works with a copy of string.
     2.  works with original address of a string.
     3.  cannot access the string.
     4.  cannot use a pointer to a string.
     Correct Answer : 2
     
QuestionID  :  15527         Subject Name  C_CET
Q96. Stacks can be implemented as
     1.  vector
     2.  list
     3.  deque
     4.  all of the above.
     Correct Answer : 4
     
QuestionID  :  15529         Subject Name  C_CET
Q97. Overflow refers to
     1.  a queue growing larger than array size.
     2.  front of queue is equal to back.
     3.  both option 1 and option 2 above.
     4.  none of the above.
     Correct Answer : 1
     
QuestionID  :  15550         Subject Name  C_CET
Q98. Which of the following algorithm is used in qsort() function
     1.  Radix sort
     2.  Selection sort
     3.  Quick sort
     4.  Insertion sort
     Correct Answer : 3
     
QuestionID  :  15552         Subject Name  C_CET
Q99. pow( ) function is present in ---- .
     1.  stdlib.h
     2.  stdio.h
     3.  complex.h
     4.  conio.h
     Correct Answer : 3
     
QuestionID  :  15553         Subject Name  C_CET
Q100. random(num) is a macro defined in
     1.  stdio.h
     2.  stdlib.h
     3.  math.h
     4.  conio.h
     Correct Answer : 2
     


QuestionID  :  13910         Subject Name  C_CET
Q1. Find the output
void main()
{
printf(”%d”);
}
     1.  garbage
     2.  -1
     3.  0
     4.  1
     Correct Answer : 3
     
QuestionID  :  13911         Subject Name  C_CET
Q2. What is the output of the following programme ?
void main()
{
static union myUnion
{
int a;
float b;
}mU1;

clrscr();
printf(“%5d”,mU1.a);
getch();
}
     1.  garbage
     2.  100
     3.  0
     4.  compile time error
     Correct Answer : 4
     
QuestionID  :  13912         Subject Name  C_CET
Q3. ## in ‘C’ language represents …..
     1.  There is nothing like ## in ‘C’ language
     2.  It indicates starting of the directive
     3.  Token-Pasting Operator
     4.  Starting of a macro code
     Correct Answer : 3
     
QuestionID  :  13913         Subject Name  C_CET
Q4. What will be the output ?

void main()
{
int cnt;
extern int tmparray[5];
clrscr();
for(cnt=0;cnt<5;cnt++)
printf(“%5d”,tmparray[cnt]);
}
int tmparray[5];
     1.  5 garbage values
     2.  Compile time error
     3.  Run time error
     4.  0 0 0 0 0
     Correct Answer : 4
     
QuestionID  :  13914         Subject Name  C_CET
Q5. The operator ~ gives you ……..
     1.  2’s complement
     2.  1’s complement in 16 bits
     3.  1’s complement in 32 bits
     4.  1’s complement in 4 bits
     Correct Answer : 3
     
QuestionID  :  13915         Subject Name  C_CET
Q6. What will be the output ?
void main()
{
char str[] = “Hello Everybody”;
clrscr();
printf(“%5s”,str);
getch();
}
     1.  Hello
     2.  Garbage
     3.  Hello Everybody
     4.  compile time error
     Correct Answer : 3
     
QuestionID  :  13916         Subject Name  C_CET
Q7. The function atoi() converts ……..
     1.  char array to integer number
     2.  int array to integer number
     3.  integer number to integer array
     4.  integer number to character array
     Correct Answer : 1
     
QuestionID  :  13917         Subject Name  C_CET
Q8. The function malloc() returns an entity of type ……..
     1.  long
     2.  void
     3.  void*
     4.  long*
     Correct Answer : 3
     
QuestionID  :  13925         Subject Name  C_CET
Q9. Functions and global variables have _______ linkage.
     1.  internal
     2.  external
     3.  none
     4.  all of the above
     Correct Answer : 2
     
QuestionID  :  13966         Subject Name  C_CET
Q10. What would be output of the following program
main()
{
printf(5+”Sunbeam Infotech”);
}
     1.  am Infotech
     2.  Sunbeam Infotech
     3.  error
     4.  none of the above
     Correct Answer : 1
     
QuestionID  :  13967         Subject Name  C_CET
Q11. find the output
#include< alloc.h >
#define MAXROW 3
#define MAXCOL 4
main()
{
int (*p)[MAXCOL];
p = (int(*)[MAXCOL])malloc(MAXROW * sizeof(*p));
printf(“%d %d”,sizeof(p),sizeof(*p));

}
     1.  24 2
     2.  2 12
     3.  2 8
     4.  24 8
     Correct Answer : 3
     
QuestionID  :  13970         Subject Name  C_CET
Q12. The bitwise AND operator is used for
     1.  Masking
     2.  Comparison
     3.  Division
     4.  Shifting bits
     Correct Answer : 1
     
QuestionID  :  13972         Subject Name  C_CET
Q13. The associativity of ! operator is
     1.  Right to Left
     2.  Left to Right
     3.  (a) for Arithmetic and (b) for Relational
     4.  (a) for Relational and (b) for Arithmetic
     Correct Answer : 1
     
QuestionID  :  13973         Subject Name  C_CET
Q14. What will be the output of the expression 11 ^ 5
     1.  5
     2.  6
     3.  11
     4.  none of the above
     Correct Answer : 4
     
QuestionID  :  13974         Subject Name  C_CET
Q15. The macro va_start is used to initialize a pointer to the beginning of the list of fixed arguments
     Correct Answer : F
     
QuestionID  :  13975         Subject Name  C_CET
Q16. Which header file should you include if you are to develop a function which can accept variable number of arguments?
     1.  vararg.h
     2.  stdlib.h
     3.  stdio.h
     4.  stdarg.h
     Correct Answer : 4
     
QuestionID  :  13989         Subject Name  C_CET
Q17. main()
{
unsigned int a = 0xffff;
~a;
printf("%x",a);
}
     1.  ffff
     2.  0000
     3.  00ff
     4.  none of the above
     Correct Answer : 1
     
QuestionID  :  14031         Subject Name  C_CET
Q18. void main()
{
int i;
printf(“%d”,i^i);
}
     1.  1
     2.  0
     3.  Unexpected
     4.  runtime error
     Correct Answer : 2
     
QuestionID  :  14034         Subject Name  C_CET
Q19. void main()
{
char a[5*2/2] = {‘a’,’b’,’c’,’d’,’e’};
printf(“%c”,a[3]);
}
     1.  c
     2.  d
     3.  compilation error
     4.  none of these
     Correct Answer : 2
     
QuestionID  :  14036         Subject Name  C_CET
Q20. What would be the output of the following program
#define MAX( a , b ) (a>b ? a : b)
void main()
{
int x;
x = MAX (3+2,2+7);
printf(“%d”,x);
}
     1.  9
     2.  5
     3.  3
     4.  2
     Correct Answer : 1
     
QuestionID  :  14041         Subject Name  C_CET
Q21. void main()
{
char *buff;
buff = (char*)calloc(10);
printf(“Buff size = %d”,sizeof(buff));
}
     1.  2
     2.  10
     3.  20
     4.  none of the above
     Correct Answer : 1
     
QuestionID  :  14048         Subject Name  C_CET
Q22. A Link is
     1.  compiler
     2.  an active debugger
     3.  C interpreter
     4.  analyzing tool in C
     Correct Answer : 4
     
QuestionID  :  14049         Subject Name  C_CET
Q23. The continue command cannot be used with
     1.  for
     2.  switch
     3.  do
     4.  while
     Correct Answer : 2
     
QuestionID  :  14051         Subject Name  C_CET
Q24. Which is a good use for typecasting?
     1.  To allow division of two integers to return a decimal value.
     2.  To allow your program to use nothing but integers.
     3.  To change the return type of a function.
     4.  To swap variables rapidly.
     Correct Answer : 1
     
QuestionID  :  14054         Subject Name  C_CET
Q25. Which of the following is false?
     1.  1
     2.  -1
     3.  .1
     4.  none of the above
     Correct Answer : 4
     
QuestionID  :  14055         Subject Name  C_CET
Q26. Evaluate !(1 && !(0 || 1))
     Correct Answer : T
     
QuestionID  :  14056         Subject Name  C_CET
Q27. int main()
{
unsigned int i;
int j;
i=1;
for(j=0;j<2;j++)
{
i = i << 1;
printf(“%d ”,i);
}
for(j=0;j<2;j++)
{
i = i >> 1;
printf(“%d ”,i);
}
}
     1.  2 4
2 1
     2.  2 4
0 0
     3.  error
     4.  4 2
1 2
     Correct Answer : 1
     
QuestionID  :  14067         Subject Name  C_CET
Q28. Void main()
{
int al();
int (*fp)();
fp = al;
(*fp)();
}
*fp()
{
printf(“Pointers”);
}
al()
{
printf(“Assignment”);
}
     1.  Pointers
     2.  Assignment Pointers
     3.  Pointers Assignment
     4.  Assignment
     Correct Answer : 4
     
QuestionID  :  14068         Subject Name  C_CET
Q29. change(int *b)
{
int i;
for(i=0;i<=4;i++)
{
*b = *b + 1;
b++;
}
}
void main()
{
int a[5] = {2,3,4,5,6},i;
change(a);
for(i=4;i>=0;i--)
printf(“%d ”,a[i]);
}
     1.  2 3 4 5 6
     2.  3 7 6 5 4
     3.  7 6 5 4 3
     4.  Lvalue required in function change
     Correct Answer : 3
     
QuestionID  :  14072         Subject Name  C_CET
Q30. void main()
{
char s[] = “\12345s\n”;
printf(“%d”,sizeof(s));
}
     1.  9
     2.  4
     3.  8
     4.  6
     Correct Answer : 4
     
QuestionID  :  14112         Subject Name  C_CET
Q31. To delete forth node in double link list representation of five nodes, we require to locate
     1.  header node
     2.  third node
     3.  third node and forth node
     4.  only the forth node
     Correct Answer : 4
     
QuestionID  :  14116         Subject Name  C_CET
Q32. struct temp
{
int a;
struct temp no_roll;
double c;
}obj;
     1.  Underscore cannot be used in variable declaration.
     2.  it will be compiled successfully.
     3.  obj must be a pointer to struct
     4.  error: struct variables cannot be included in its own structure
     Correct Answer : 4
     
QuestionID  :  14117         Subject Name  C_CET
Q33. Let sizeof(int) = 4 and sizeof(long) = 8
What will be the sizeof(struct SUN);
Struct SUN
{
int XML[2];
union
{
char ITS[7];
int practice;
}student;
long VB;
char Java;
};
     1.  32
     2.  28
     3.  24
     4.  system dependent
     Correct Answer : 3
     
QuestionID  :  14119         Subject Name  C_CET
Q34. int takefirst(int a,int b,int c)
{
return (++a,b+2,c);
}
void main( )
{
static int m,n;
m = takefirst(n,m,n);
printf(“%d”,m);
}
     1.  2
     2.  1
     3.  0
     4.  syntax error in the return statement
     Correct Answer : 3
     
QuestionID  :  14125         Subject Name  C_CET
Q35. Recursion technique uses data structure
     1.  stack
     2.  queue
     3.  heap
     4.  linked list
     Correct Answer : 1
     
QuestionID  :  14127         Subject Name  C_CET
Q36. A circular link representation with n nodes will have – links
     1.  n+1
     2.  n+2
     3.  n
     4.  n-1
     Correct Answer : 3
     
QuestionID  :  14129         Subject Name  C_CET
Q37. struct node
{
int data;
struct node *llink;
struct node *rlink;
};
This structure can be used for
     1.  singly linked list
     2.  doubly linked list
     3.  doubly circular list
     4.  2 and 3 both
     Correct Answer : 4
     
QuestionID  :  14130         Subject Name  C_CET
Q38. Pointer of singly circular list with only one node will point to---
     1.  next node
     2.  previous node
     3.  same node
     4.  NULL
     Correct Answer : 3
     
QuestionID  :  14133         Subject Name  C_CET
Q39. What do you think is true about queue data structure?
i. it is a LILO data structure
ii. elements from queue are deleted from the rear end
iii. we can design a circular queue
     1.  i and ii
     2.  i and iii
     3.  i, ii and iii
     4.  i only
     Correct Answer : 2
     
QuestionID  :  14135         Subject Name  C_CET
Q40. void main( )
{
enum days{mon,tue,wed,sat,sun };
enum days d1,d2,d3;
d1 = mon + sun;
d2 = wed – sat;
d3 = sun * tue;
printf(“%d %d %d”,d1,d2,d3);
}
     1.  4 -1 4
     2.  1 5 5
     3.  0 4 4
     4.  compilation error
     Correct Answer : 1
     
QuestionID  :  14138         Subject Name  C_CET
Q41. enum records{one,two=4,three,four=4};
void main( )
{
printf(“%d %d %d %d”, one,two,three,four);
}
     1.  0 4 5 4
     2.  1 4 3 4
     3.  1 4 5 4
     4.  0 4 3 4
     Correct Answer : 1
     
QuestionID  :  14139         Subject Name  C_CET
Q42. What is true regarding a return statement in a function?
     1.  There cannot be more than one return statement in a function
     2.  A return statement must be at the end of the function
     3.  A function by default returns an integer value.
     4.  All of the above are true
     Correct Answer : 3
     
QuestionID  :  14189         Subject Name  C_CET
Q43. What keyword covers unhandled possibilities?
     1.  all
     2.  contingency
     3.  default
     4.  other
     Correct Answer : 3
     
QuestionID  :  14190         Subject Name  C_CET
Q44. Which of the following gives the memory address of a pointer a?
     1.  a
     2.  *a
     3.  &a
     4.  address(a)
     Correct Answer : 1
     
QuestionID  :  14191         Subject Name  C_CET
Q45. Which of the following is the proper keyword to deallocate
memory?
     1.  free
     2.  delete
     3.  clear
     4.  remove
     Correct Answer : 1
     
QuestionID  :  14194         Subject Name  C_CET
Q46. Which header file do you need to include to use typecasting?
     1.  iostream.h
     2.  ctype.h
     3.  math.h
     4.  none
     Correct Answer : 4
     
QuestionID  :  14195         Subject Name  C_CET
Q47. find the output:
void sp_to_dash(const char *str);
int main(void)
{
sp_to_dash(“This is a test”);
return 0;
}
void sp_to_dash(const char *str)
{
while(*str)
{
if(*str==’ ‘) *str = ‘-‘;
printf(“%c”,*str);
str++;
} }
     1.  This-is-a-test
     2.  Error message
     3.  This is a test
     4.  None of the above
     Correct Answer : 2
     
QuestionID  :  14203         Subject Name  C_CET
Q48. Why can typecasting be dangerous?
     1.  Some conversions are not defined, such as char to int.
     2.  You might permanently change the value of the variable.
     3.  You might temporarily lose part of the data - such as truncating a float when typecasting to an int.
     4.  There are no dangers.
     Correct Answer : 3
     
QuestionID  :  14218         Subject Name  C_CET
Q49. Which of the following is a properly defined struct?
     1.  struct {int a;}
     2.  struct a_struct {int a;}
     3.  struct a_struct int a;
     4.  struct a_struct {int a;};
     Correct Answer : 4
     
QuestionID  :  14223         Subject Name  C_CET
Q50. The number of the relational operators in c language is
     1.  four
     2.  six
     3.  three
     4.  one
     Correct Answer : 2
     
QuestionID  :  14229         Subject Name  C_CET
Q51. Which among the following is a unconditional control structure
     1.  do-while
     2.  if-else
     3.  goto
     4.  for
     Correct Answer : 3
     
QuestionID  :  14230         Subject Name  C_CET
Q52. The output of printf("%u", -1) is
     1.  -1
     2.  minimum int value
     3.  maximum int value
     4.  error message
     Correct Answer : 3
     
QuestionID  :  14303         Subject Name  C_CET
Q53. Which of the following are tokens in C?
     1.  keywords
     2.  variables
     3.  constants
     4.  all of the above
     Correct Answer : 4
     
QuestionID  :  14367         Subject Name  C_CET
Q54. void main( )
{
int i=0,j;
j = ++i+i++/i+i--;
printf(“%d”,j);
}
     1.  4
     2.  5
     3.  garbage
     4.  3
     Correct Answer : 4
     
QuestionID  :  14369         Subject Name  C_CET
Q55. void main( )
{
int red=0,pink;
pink =~red;
printf(“%d”,pink);
}
     1.  -32768
     2.  -1
     3.  1111
     4.  compilation error
     Correct Answer : 2
     
QuestionID  :  14370         Subject Name  C_CET
Q56. void main( )
{
int K=-7;
printf(“%d”,0< K);
}
     1.  0
     2.  1
     3.  compilation error
     4.  -7
     Correct Answer : 1
     
QuestionID  :  14371         Subject Name  C_CET
Q57. void main()
{
char *pointer;
pointer = “Great” “Life”;
printf(“%s”,pointer);
}
     1.  Great
     2.  Great Life
     3.  GreatLife
     4.  compilation error
     Correct Answer : 3
     
QuestionID  :  14378         Subject Name  C_CET
Q58. To reduce complexity of data type declaration we can use
     1.  union
     2.  enum
     3.  typedef
     4.  struct
     Correct Answer : 3
     
QuestionID  :  14381         Subject Name  C_CET
Q59. Let`s say that you insert a new node between two existing nodes in a singly linked list. Which link pointers do you think require a new value?
i. The one after the new node
ii. The one belonging to a new node.
iii. The one before the new node and the one after the new node.
iv. The one before the new node.
     1.  i, ii and iv
     2.  ii and iv
     3.  i, ii and iii
     4.  i and iii
     Correct Answer : 2
     
QuestionID  :  14428         Subject Name  C_CET
Q60. void print(int *a, int *b, int *c, int *d, int *e,)
{
printf(“%d%d%d%d%d”,*a, *b, *c, *d, *e);
}
void main()
{
static int arr[] = {90,91,92,93,94,95,96,97};
int *ptr = arr+1;
print(++ptr, ptr--, ptr, ptr++, ++ptr);
}
     1.  97 96 95 94 93
     2.  93 93 93 93 92
     3.  90 91 92 93 94
     4.  93 93 93 92 92
     Correct Answer : 4
     
QuestionID  :  14430         Subject Name  C_CET
Q61. Which of the following statement provides exit-controlled looping?
     1.  while statement
     2.  do-while statement
     3.  for statement
     4.  goto statement
     Correct Answer : 4
     
QuestionID  :  14433         Subject Name  C_CET
Q62. void **p will be incremented by how many bytes?
     1.  1
     2.  2
     3.  0
     4.  4
     Correct Answer : 2
     
QuestionID  :  14434         Subject Name  C_CET
Q63. The degree of a leaf node in a general tree is
     1.  0
     2.  -1
     3.  1
     4.  can not say
     Correct Answer : 1
     
QuestionID  :  14436         Subject Name  C_CET
Q64. void main( )
{
int x,y=2,z,a;
x = (y*=2)+(z=a=y);
printf(“%d”,x);
}
     1.  compilation error
     2.  4
     3.  8
     4.  6
     Correct Answer : 3
     
QuestionID  :  14440         Subject Name  C_CET
Q65. Which can be used as an external sorting method.
     1.  Bubble sort
     2.  Insertion sort
     3.  Merge sort
     4.  Selection sort
     Correct Answer : 3
     
QuestionID  :  14441         Subject Name  C_CET
Q66. ---sorting method is least efficient.
     1.  quick sort
     2.  merge sort
     3.  radix sort
     4.  bubble sort
     Correct Answer : 4
     
QuestionID  :  14446         Subject Name  C_CET
Q67. In a singly linked list, if a new node is to be inserted between two consecutive nodes how many links have to be modified?
     1.  1
     2.  2
     3.  3
     4.  4
     Correct Answer : 2
     
QuestionID  :  14529         Subject Name  C_CET
Q68. On error fclose( ) function returns
     1.  0
     2.  EOF
     3.  -1
     4.  none of the above
     Correct Answer : 2
     
QuestionID  :  14530         Subject Name  C_CET
Q69. int show(int v)
{
if(v= =1||v= =0)
return 1;
if(v % 2==0)
return show(v/2) +2;
else
return show(v-2) +3;
}
void main( )
{
int z;
z = show(7);
printf(“%d”,z);
}
     1.  11
     2.  5
     3.  10
     4.  infinite loop
     Correct Answer : 3
     
QuestionID  :  14538         Subject Name  C_CET
Q70. int mix(int m)
{
m++;
return (m);
}
void main( )
{
int k=5,z;
z=mix(k=mix(k=mix(k)));
printf(“%d”,k);
}
     1.  5
     2.  8
     3.  9
     4.  7
     Correct Answer : 4
     
QuestionID  :  14540         Subject Name  C_CET
Q71. By using which of the following data structure we can convert a infix arithmetic expression into a postfix.
     1.  Doubly linked list
     2.  Queue
     3.  Stack
     4.  Graph
     Correct Answer : 3
     
QuestionID  :  14541         Subject Name  C_CET
Q72. In case of a linked list
     1.  arrays are used to hold the list
     2.  every link node has a link to the next node
     3.  links have array of pointer to next link
     4.  all of the above
     Correct Answer : 2
     
QuestionID  :  14542         Subject Name  C_CET
Q73. void main( )
{
int i=0;
for(i=1;;i++)
if(i= =5)
{
printf(“%d ”,i) ;
break;
}
else
{
printf(“%d ”,i++);
continue;
}
}
     1.  1 2 3 4 5
     2.  2 4 6
     3.  1 3 5
     4.  compilation error: condition missing in the for loop
     Correct Answer : 3
     
QuestionID  :  14546         Subject Name  C_CET
Q74. Which of the following statements are correct
     1.  enum variables can be assigned new values.
     2.  enum variables can be compared.
     3.  enumeration features does not increase the power of C.
     4.  All of the above.
     Correct Answer : 4
     
QuestionID  :  14547         Subject Name  C_CET
Q75. Which of the following statements is false?
i. Structure is a collection of elements of different data types.
ii. We cannot initialize Union.
iii. We can initialize static or global structure.
iv. We can use typedef with structure.
     1.  iii only
     2.  ii and iii
     3.  ii only
     4.  All are true
     Correct Answer : 3
     
QuestionID  :  14548         Subject Name  C_CET
Q76. void main( )
{
float ch=2.5;
switch(ch)
{
case 2.5: printf(“%f”,ch);
case 2.0: printf(“%f”,ch); break;
default: printf(“%f”,ch); break;
}
}
     1.  2.5 2.5
     2.  2.5
     3.  2.0 2.5
     4.  compilation error
     Correct Answer : 4
     
QuestionID  :  14551         Subject Name  C_CET
Q77. On error ftell( ) returns
     1.  0
     2.  -1
     3.  -1L
     4.  0L
     Correct Answer : 3
     
QuestionID  :  14554         Subject Name  C_CET
Q78. The maximum combined length of the command line arguments including the spaces between adjacent argument is
     1.  128 characters
     2.  256 characters
     3.  67 characters
     4.  it may vary from one operating system to another
     Correct Answer : 4
     
QuestionID  :  14558         Subject Name  C_CET
Q79. Which of the following is the feature of stack
     1.  All operations are at one end
     2.  It can not reuse its memory
     3.  All elements are of different data types
     4.  Any element can be accessed from it directly
     Correct Answer : 1
     
QuestionID  :  14606         Subject Name  C_CET
Q80. void main( )
{
printf(“Hello”);
char far *p = 0x417;
*p = 64;
printf(“%d”,p);
}
     1.  Hello 0
     2.  0 Hello
     3.  HELLO
     4.  compilation error
     Correct Answer : 4
     
QuestionID  :  14608         Subject Name  C_CET
Q81. void main( )
{
struct num1
{
char ch[7];
char *s;
};
struct num2
{
char *c;
struct num1 s1;
};
static struct num2 s2 = {“apple”,”orange”,”lemon”};
printf(“%s %s”,s2.c,s2.s1.s);
printf(“%s %s”,s2.c++,++s2.s1.s);
}
     1.  apple lemon orange
     2.  apple lemon apple orange
     3.  apple lemon pple emon
     4.  apple lemon apple emon
     Correct Answer : 4
     
QuestionID  :  14611         Subject Name  C_CET
Q82. void main( )
{
int show( );
int (*fun)( );
fun = show;
display(fun);
}
show( )
{
printf(“Sunbeam…”);
}
display(f1)
int (*f1)( );
{
(*f1)( );
}
     1.  Sunbeam…is printed twice
     2.  Sunbeam…is printed once
     3.  Expression syntax in display( )
     4.  Compilation error
     Correct Answer : 2
     
QuestionID  :  14613         Subject Name  C_CET
Q83. What is the correct sytanx for allocating memory for a 2-D pointer?
int **p,*q,r=100;
     1.  P = (int*)malloc(sizeof(int*));
     2.  P = (int*)malloc(sizeof(int**));
     3.  P = (int**)malloc(sizeof(int*));
     4.  None of the above
     Correct Answer : 3
     
QuestionID  :  14629         Subject Name  C_CET
Q84. void main()
{
FILE *f1,*f2;
int troll,x;
char tname[20];
clrscr();
f1 = fopen("data.txt","w");
f2 = fopen("data.txt","r");
if (f2==0) {
printf("Error While Opening The File DATA.DAT");
exit(0);
}
while(1) {
printf("Enter Roll and Name : ");
scanf("%d %s",&troll,tname);
if(troll<=0) break;
fprintf(f1,"%d %s ",troll,tname);
}
clrscr();
while( fscanf(f2,"%d %s",&troll,tname)>0 )
printf("\n%5d%20s",troll,tname);
getch();
}

If input provided is as follows:
1 A
2 B
3 C
4 D
5 E
0 XX
,then what will be the output?
     1.  1 A
2 B
3 C
4 D
5 E
     2.  Compile time error
     3.  Run time error.
     4.  No Output i.e. blank screen
     Correct Answer : 4
     
QuestionID  :  14632         Subject Name  C_CET
Q85. What will be the output?
void main()
{
int p=10,q=20;
clrscr();
printf("%5d%5d",p&q,p&&q);
getch();
}
     1.  0 0
     2.  0 1
     3.  1 0
     4.  1 1
     Correct Answer : 2
     
QuestionID  :  14635         Subject Name  C_CET
Q86. void main()
{
FILE *f1,*f2;
int troll,x;
char tname[20];
clrscr();
f1 = fopen("data.txt","w");
f2 = fopen("data.txt","r");
if (f2==0) {
printf("Error While Opening The File DATA.DAT");
exit(0);
}
while(1) {
printf("Enter Roll and Name : ");
scanf("%d %s",&troll,tname);
if(troll<=0) break;
fprintf(f1,"%d",troll);
}
clrscr();
while( fscanf(f2,"%d %s",&troll,tname)>0 )
printf("\n%5d%20s",troll,tname);
getch();
}
If input provided is as follows:
1 A
2 B
3 C
4 D
5 E
0 XX
,then what will be the output?
     1.  Same as that of input.
     2.  1 A
     3.  12345 XX
     4.  Blank Screen. i.e. No Output.
     Correct Answer : 3
     
QuestionID  :  14649         Subject Name  C_CET
Q87. void main()
{
enum code
{
add;
delete;
modify;
unchanged;
};
typedef enum code CODE;
CODE c,d;
c = add;
d = modify;
printf(“c = %d d = %d”,c,d);
}
     1.  c = 0 d = 0
     2.  c = 1 d = 3
     3.  c = 0 d = 2
     4.  c = garbage value d = garbage value
     Correct Answer : 3
     
QuestionID  :  14651         Subject Name  C_CET
Q88. void main( )
{
int a=12,i=0;
while(a>>=i)
{
printf(“ a=%d i=%d ”,a,i);
i++;
}
}
     1.  a=12 i=0 a=6 i= 1 a=3 i=2 a=1 i=3
     2.  a=12 i=0 a=6 i= 1 a=3 i=2
     3.  a=12 i=0 a=6 i= 1 a=1 i=2
     4.  a=12 i=0 a=6 i= 1 a=1 i=2 ……………infinite loop
     Correct Answer : 3
     
QuestionID  :  14655         Subject Name  C_CET
Q89. 1. What will be the output of the following code
main()
{
char str1[]="Banglore-440010";
char str2[15];
strcpy(str2,"Pune ");
strncat(str2,str1,8);
printf("%s",str2);
}
     1.  Pune Banglore-440010
     2.  Pune Banglore
     3.  Banglore
     4.  Pune Ban
     Correct Answer : 2
     
QuestionID  :  14656         Subject Name  C_CET
Q90. What is true about strtok( ) function
     1.  returns a pointer to the first character of the first token in source
     2.  writes a null character into source immediately following the returned token.
     3.  Subsequent calls with null for the first argument will work through the
     4.  all of the above
     Correct Answer : 4
     
QuestionID  :  14658         Subject Name  C_CET
Q91. void main( )
{
int a = 0xff;
if(a<<4>>12)
printf(“Leftlist”);
else
printf(“Rightlist”);
}
     1.  Leftlist
     2.  Rightlist
     3.  compilation error
     4.  runtime error
     Correct Answer : 2
     
QuestionID  :  14660         Subject Name  C_CET
Q92. Which of the following functions are ideally suited for reading the contents of a file record by record?
     1.  getc( )
     2.  gets( )
     3.  fread( )
     4.  fgets( )
     Correct Answer : 3
     
QuestionID  :  15343         Subject Name  C_CET
Q93. 8. point out the error from following code
main()
{
fun(1,4,7,11,0)
}

Fun(…)
{
Va_list ptr;
int num;

Va_start(ptr,int);
Num=va_arg(ptr,int);
Printf(“%d”,num);
}
     1.  Compilation error
     2.  b. There is no fixed argument in the definition of fun.
     3.  c. Too few parameter in call of function fun
     4.  It will output 1 on screen.
     Correct Answer : 2
     
QuestionID  :  15346         Subject Name  C_CET
Q94. If we use following printf(“%d”,num); to print a long int we will get warning message.
     Correct Answer : F
     
QuestionID  :  15347         Subject Name  C_CET
Q95. How would you dynamically allocate a 2-D arrays of 3 rows and 4 columns such that we are able to access any element using 2 subscripts, as in arr[i][j]? Also the rows of the array should be stored in adjacent memory locations.
     1.  int **p, i ,j;
p=(int **) malloc(3 *sizeof(int *));
for(i=0; i<3; i++)
p[i]=p[0] + i * 4
     2.  int **p, i ,j;
p=(int **) malloc(3 * 4 * sizeof(int *));
     3.  int *p= (int **) malloc(3 * 4 * sizeof(int *));
     4.  int *p= (int *) malloc(3 * 4 * sizeof(int *));
     Correct Answer : 1
     
QuestionID  :  15348         Subject Name  C_CET
Q96. What is true calloc() about function?
     1.  calloc() will set each element with a value 0.
     2.  calloc() needs two arguments number of elements and size of each element.
     3.  Option a & b is true.
     4.  None of the above.
     Correct Answer : 3
     
QuestionID  :  15436         Subject Name  C_CET
Q97. What is wrong with this?
main(){
int *ptr;
*ptr=10;
}
     1.  Incorrect assignment
     2.  incorrect and will not compile
     3.  10
     4.  This program compiles fine. But, has unpredictable behaviour at run time
     Correct Answer : 4
     
QuestionID  :  15520         Subject Name  C_CET
Q98. For the following prototype
float funct(float *var);
Then within funct() to refer var value being passed using
     1.  *var
     2.  var
     3.  float var
     4.  float *var
     Correct Answer : 1
     
QuestionID  :  15529         Subject Name  C_CET
Q99. Overflow refers to
     1.  a queue growing larger than array size.
     2.  front of queue is equal to back.
     3.  both option 1 and option 2 above.
     4.  none of the above.
     Correct Answer : 1
     
QuestionID  :  15547         Subject Name  C_CET
Q100. What do the function itoa ( ) do?
     1.  Converts a string to an integer.
     2.  Converts an integer to a string
     3.  Converts a floating-point number to a string.
     4.  Converts a string to a floating-point number.
     Correct Answer : 2