Q&A Discussions
html page
<form action="upload.PHP" enctype="multipart/form-data" method="post">
<input type =file name=kk>
<input type=submit>
</submit>
PHP page
upload.PHP
<?PHP
$file=trim($_FILES['kk']['name'];
if(move_uploaded_file($_FILES['kk']['temp_name'],$folder.$file))
{
echo"<h1>file uploaded";
}
else{echo"<h1>not";}
?>
0 Votes
5 Answers#include <iostream>
#include <bitset>
int main()
{
int myDecimalNumber;
std::cin >> myDecimalNumber;
std::string binary = std::bitset<8>(myDecimalNumber).to_string(); //to binary
std::cout<<binary<<"\n";
unsigned long decimal = std::bitset<8>(binary).to_long();
std::cout<<decimal<<"\n";
return 0;
}
2 Votes
5 Answerswhat is tjis code problem!
#include <iostream>
using namespace std;
int main()
{
int b = 5;
int arr[b] = {11, 35, 62, 555, 989};
int sum = 0;
for (int x = 0; x < 5; x++) {
sum += arr[x];
}
cout << sum << endl;
return 0;
}
I cannot make an array using int variable in order to define array's element number!?
1 Vote
7 Answers#include <iostream>
using namespace std;
int sum(int a, int b=42) {
int result = a + b;
return (result);
}
int main() {
int x = 24;
int y = 36;
//calling the function with both parameters
int result = sum(x, y);
cout << result << endl;
//calling the function without b
result = sum(x);
cout << result << endl;
return 0;
}
why is da last function cout 66 and not 48 isn't it suppose to add 24+24?
1 Vote
6 AnswersHot today
Someone can help me
1 Votes
What's wrong with this?
2 Votes
HTML community, HELP!!
1 Votes
I am a super beginner
0 Votes
X velocity
0 Votes
Web Dev
0 Votes
How this program executes?
0 Votes
Pls give me an idea
1 Votes