Programming IN c

Moderator: CS Moderators Team

Programming IN c

Postby chetankamani » Tue Jul 08, 2014 11:26 am

Q-1 Which of the following variable has life same as local variable?
A global
B static
C register
D None of the above

Q-2 The life of local variable declared in main() is same as
A local variable
B static variable
C global variable
D None of the above

Q-3 Which of the following results into an error in C?
A) Defining a local and a global variables with same name
B) Defining a local variable inside a function with same name as function argument
C) Defining a global variable as static
D) Defining a function argument as register

Q-4 Which of the following causes "unreachable statements" error in C?
A) unconditional break
B) unconditional continue
C) unconditional return in middle of function body
D) All of the above
chetankamani
 
Posts: 12
Joined: Tue Jan 14, 2014 11:36 am
My College/Company:: CTE gujarat
Roll Number: 9999999

Re: Programming IN c

Postby Shouvick1990 » Tue Jul 08, 2014 5:58 pm

1. (C)register
2. (A)local variable
3. (B)Defining a local variable inside a function with same name as function argument
4. (C)unconditional return in middle of function body
Shouvick Mondal
Shouvick1990
 
Posts: 7
Joined: Sun Jun 22, 2014 11:20 am
Location: Howrah
Currently what are you doing?: Am Studying
My College/Company:: IIEST Shibpur
Roll Number: 0
Packages: Previous Student
City: Kolkata


Return to CS Discussions!

Who is online

Users browsing this forum: No registered users and 4 guests
cron