Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Filter
Profile
Wall
Recent activity
All questions
All answers
Exams Taken
All Blogs
Recent activity by sp_gateoverflow
2
answers
1
ISI 2019 | PCB CS | Question: 11
Consider an array of length $n$ consisting only of positive and negative integers. Design an algorithm to rearrange the array so that all the negative integers appear before all the positive integers, using $O(n)$ time and only constant amount of extra space.
Consider an array of length $n$ consisting only of positive and negative integers. Design an algorithm to rearrange the array so that all the negative integers appear bef...
360
views
answered
Apr 6, 2023
Others
isi2019-pcb-cs
descriptive
+
–
1
answer
2
I am not able to understand how the value of 'i' is 3 after the execution of the program, it must be 2.
#include <stdio.h int main () { int i, j; int a [8] = {1, 2, 3, 4, 5, 6, 7, 8}; for(i = 0; i < 3; i++) { a[i] = a[i] + 1; i++; } i ; for (j = 7; j 4; j ) { int i = j/2; ...
385
views
answered
Jul 20, 2022
Programming in C
programming-in-c
output
+
–
8
answers
3
GATE CSE 2015 Set 3 | Question: 7
Consider the following C program segment. # include <stdio.h> int main() { char s1[7] = "1234", *p; p = s1 + 2; *p = '0'; printf("%s", s1); } What will be printed by the program? $12$ $120400$ $1204$ $1034$
Consider the following C program segment.# include <stdio.h int main() { char s1[7] = "1234", *p; p = s1 + 2; *p = '0'; printf("%s", s1); }What will be printed by the pro...
16.1k
views
answered
Oct 6, 2019
Programming in C
gatecse-2015-set3
programming
programming-in-c
normal
array
+
–
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register