Login
Register
@
Dark Mode
Profile
Edit my Profile
Messages
My favorites
Register
Activity
Q&A
Questions
Unanswered
Tags
Subjects
Users
Ask
Previous Years
Blogs
New Blog
Exams
Dark Mode
gate 1994
Rameez Raza
asked
in
Programming in C
Jun 14, 2017
618
views
1
vote
1
vote
Function what(x, n:integer): integer:
Var
value : integer
begin
value := 1
if n > 0 then
begin
if n mod 2 =1 then
value := value * x;
value := value * what(x*x, n div 2);
end;
what := value;
end;
convert the code in c
identify-function
Rameez Raza
asked
in
Programming in C
Jun 14, 2017
by
Rameez Raza
618
views
answer
comment
Follow
share this
share
1 comment
by
Rameez Raza
commented
Jun 14, 2017
reply
Follow
share this
https://gateoverflow.in/2502/gate1994_6
0
0
Please
log in
or
register
to add a comment.
Please
log in
or
register
to answer this question.
0
Answers
← Previous
Next →
← Previous in category
Next in category →
Related questions
19
votes
19
votes
3
answers
1
Kathleen
asked
in
Algorithms
Oct 5, 2014
2,765
views
GATE CSE 1994 | Question: 6
What function of $x$, $n$ is computed by this program? Function what(x, n:integer): integer: Var value : integer begin value := 1 if n > 0 then begin if n mod 2 =1 then value := value * x; value := value * what(x*x, n div 2); end; what := value; end;
Kathleen
asked
in
Algorithms
Oct 5, 2014
by
Kathleen
2.8k
views
gate1994
algorithms
identify-function
normal
descriptive
5
votes
5
votes
2
answers
2
Souvik33
asked
in
Programming in C
Jan 15, 2023
1,125
views
GATE CSE 2014 Set 2 | Question: 10 | Modified
Consider the function func shown below: int func(int num) { int count = 0; while (num) { count++; num>>= 1; } return (count); } The value returned by func(-435) is: 6 9 Will loop forever Depends on computer architecture
Souvik33
asked
in
Programming in C
Jan 15, 2023
by
Souvik33
1.1k
views
algorithms
identify-function
numerical-answers
easy
13
votes
13
votes
4
answers
3
Arjun
asked
in
Programming in C
Feb 7, 2019
9,578
views
GATE CSE 2019 | Question: 18
Consider the following C program : #include<stdio.h> int jumble(int x, int y){ x = 2*x+y; return x; } int main(){ int x=2, y=5; y=jumble(y,x); x=jumble(y,x); printf("%d \n",x); return 0; } The value printed by the program is ______________.
Arjun
asked
in
Programming in C
Feb 7, 2019
by
Arjun
9.6k
views
gatecse-2019
programming-in-c
numerical-answers
identify-function
1-mark
54
votes
54
votes
7
answers
4
Arjun
asked
in
Programming in C
Feb 14, 2017
16,914
views
GATE CSE 2017 Set 2 | Question: 43
Consider the following snippet of a C program. Assume that swap $(\&x, \&y)$ exchanges the content of $x$ and $y$: int main () { int array[] = {3, 5, 1, 4, 6, 2}; int done =0; int i; while (done==0) { done =1; for (i=0; i<=4; i ... i-1]) { swap(&array[i], &array[i-1]); done =0; } } } printf( %d , array[3]); } The output of the program is _______
Arjun
asked
in
Programming in C
Feb 14, 2017
by
Arjun
16.9k
views
gatecse-2017-set2
programming
algorithms
numerical-answers
identify-function
Subscribe to GATE CSE 2024 Test Series
Subscribe to GO Classes for GATE CSE 2024
Quick search syntax
tags
tag:apple
author
user:martin
title
title:apple
content
content:apple
exclude
-tag:apple
force match
+apple
views
views:100
score
score:10
answers
answers:2
is accepted
isaccepted:true
is closed
isclosed:true
Recent Posts
Post GATE 2024 Guidance [Counseling tips and resources]
GATE CSE 2024 Result Responses
[Project Contest] Pytorch backend support for MLCommons Cpp Inference implementation
Participating in MLCommons Inference v4.0 submission (deadline is February 23 12pm IST)
IIITH PGEE 2024 Test Series by GO Classes
Subjects
All categories
General Aptitude
(3.5k)
Engineering Mathematics
(10.4k)
Digital Logic
(3.6k)
Programming and DS
(6.2k)
Programming
(4.1k)
Programming in C
(4.1k)
Programming in Python
(5)
DS
(2.0k)
Algorithms
(4.8k)
Theory of Computation
(6.9k)
Compiler Design
(2.5k)
Operating System
(5.2k)
Databases
(4.8k)
CO and Architecture
(4.0k)
Computer Networks
(4.9k)
Artificial Intelligence
(79)
Machine Learning
(48)
Data Mining and Warehousing
(25)
Non GATE
(1.4k)
Others
(2.7k)
Admissions
(684)
Exam Queries
(1.6k)
Tier 1 Placement Questions
(17)
Job Queries
(80)
Projects
(11)
Unknown Category
(870)
64.3k
questions
77.9k
answers
244k
comments
80.0k
users
Recent Blog Comments
category ?
Hi @Arjun sir, I have obtained a score of 591 in ...
download here
Can you please tell about IIT-H mtech CSE self...
Please add your admission queries here:...
Twitter
WhatsApp
Facebook
Reddit
LinkedIn
Email
Link Copied!
Copy