The previous answers by mpprogram6771 and MSalters nailed it. I'd like to add that, as $\ce{CO2}$ is a very small molecule, you can, with a bit of effort, set up a little numeric experiment to answer your own question, and even get approximate partial charges in each atom, and dipole moment of the whole molecule, using just free/open source software.
First, you need to install molecular modelling software in your machine. The one I like most is Avogadro. It has wonderful usability and many features to design and visualize your compounds. Ghemical was also good, but it seems to be unmaintained for years now. I could not getting it working properly anymore.
In my machine I use Ubuntu MATE 18.04 (a GNU/Linux variant) as the operating system. There I'm able to install Avogadro with a simple command in the terminal:
sudo apt-get install avogadro
With Avogadro you can assemble the $\ce{CO2}$, joining the carbon atom and both oxygen atoms with double bonds. Beyond the molecular editor, you will need another piece of software, able to take the data about the molecule you assembled and do a series of quantum mechanical calculations over it, to give you an approximate answer to your questions.
There is a great variety of quantum mechanical software, as this page on Wikipedia shows. Unfortunately, IMHO the landscape of free/open source tools in this field is fragmented, and most lag far behind Avogadro in terms of usability, stuck in the average level of user-friendliness of the 1980s (sometimes at the compile-it-yourself level), and the proprietary alternatives have restrictive licenses and/or are eye-watering expensive, out of reach of people with no institutional affiliation. Academia treats its voluntary toolmakers badly, as some great people in mathematics can tell you, firsthand. Sooner or later we must fix that. We need a William Stein in computational chemistry. I just hope he/she gets better treatment after stepping up to the task.
Yet, among the several packages supported by the Avogadro input generator, my recommendation is Psi4, for a beginner. It's as easy to install as Avogadro, if you're under Ubuntu or any Debian-based distribution.
sudo apt-get install psi4
They have a well documented site, with a section dedicated to education with simple projects and friendly message boards. The version available in the Ubuntu repository is functional, but quite outdated, 1.1.5, as of Mar 2020. If one is serious about learning it, my advice is to download it directly from their site. The latest stable version as Mar 2020 is 1.3.2. But for the sake of this answer, the repository default is enough.
After assembling your molecule and doing some preliminary geometry optimization inside Avogadro, you can generate a preliminary input text file with its Psi4 plugin under menu Extras → PSI4. My preliminary version started like this:
set basis aug-cc-pVDZ
molecule {
0 1
C -3.47367 0.73246 0.22361
O -2.43476 1.12414 -0.22175
O -4.51237 0.34053 0.66926
}
optimize('B3LYP-D')
The Avogadro plugin for Psi4 is very basic, so we will need to tune the template by hand. A set of good templates you can change to fit your needs is a great thing to have when learning to use a new package. We should have more of these. But first things first, let's see what we have on our proto-input. It has three sections. The first section specify a basis set, aug-cc-pVDZ (computational chemists love to feast on alphabet soup). To be short, a basis set is a jury-rigged set of easy-to-calculate mathematical functions, used emulate the real, hard-to-calculate atomic and molecular orbitals, kind of like this:
The second section has the x,y,z coordinates of every atom in the molecule, and also its overall charge (in this case 0) and multiplicity (in this case 1, as all electrons are paired). The third section says what kind of information we want to calculate from our initial information, in this case, the optimum geometry of the molecule (optimize), and the algorithmic machinery chosen to process it, in this case, B3LYP-D (another serving of alphabet soup), a variant of density functional theory (DFT).
I changed the Avogadro generated template as follows:
memory 4 Gb
set basis aug-cc-pVTZ
molecule {
0 1
C -3.47367 0.73246 0.22361
O -2.43476 1.12414 -0.22175
O -4.51237 0.34053 0.66926
}
optimize('B3LYP-D')
E, wfn = energy('B3LYP-D', return_wfn=True)
oeprop(wfn, "MULLIKEN_CHARGES", "DIPOLE", title = "CO2 B3LYP-D")
I optionally raised the limit on system memory to 4 GB, from the system default, as my machine has a good amount of memory. As the molecule is small and the impact on runtime will be probably acceptable, I also changed the previous basis set, aug-cc-pVDZ, to one more detailed, aug-cc-pVTZ. Also added a section asking Psi4 to return a wavefunction (wfn) object for the system, besides its energy (E). Finally, following the guidance on the Psi4 manual here, I added a section asking for our information of interest, the estimated partial charges on each atom, given by Mulliken analysis, and the estimated dipole moment on the $\ce{CO2}$ molecule.
Now we can save the text file with our input data and run Psi4 in the terminal:
psi4 carbon_dioxide.in
After some time, Psi4 will finish the run, and return its results to an output file named carbon_dioxide.out that has a huge amount of information. But the section of more interest to your question is right at the end:
Properties computed using the CO2 B3LYP-D density matrix
Nuclear Dipole Moment: (a.u.)
X: -0.0000 Y: 0.0000 Z: 0.0000
Electronic Dipole Moment: (a.u.)
X: 0.0000 Y: 0.0000 Z: -0.0000
Dipole Moment: (a.u.)
X: 0.0000 Y: 0.0000 Z: -0.0000 Total: 0.0000
Dipole Moment: (Debye)
X: 0.0000 Y: 0.0000 Z: -0.0001 Total: 0.0001
Mulliken Charges: (a.u.)
Center Symbol Alpha Beta Spin Total
1 C 2.80993 2.80993 0.00000 0.38015
2 O 4.09503 4.09503 0.00000 -0.19006
3 O 4.09504 4.09504 0.00000 -0.19008
Total alpha = 11.00000, Total beta = 11.00000, Total charge = 0.00000
*** Psi4 exiting successfully. Buy a developer a beer!
The results indicate exactly the situation you intuitively predicted, with both oxygen atoms pulling electron density away from the central carbon atom and the carbon atom becoming slightly positive and the oxygen atoms slightly negative. In fact, we were able to use the computer as a sort of power armor for the mind.
At first, your intuition could only provide vague guidance in the direction of electron density transfer, from oxygen to carbon. Now we can corroborate that, and augment our intuition with numeric estimates, an average loss of 0.38 electrons in the carbon atom and an average gain of 0.19 electrons in each oxygen atom. Wonderful.
Despite the charge separation, the results of our little numeric experiment also point to near zero dipole moment, as we see. It doesn't tell us explicitly why. But our geometric intuition suggest a way out. As there are two oxygen atoms, the effect of charge separation on both may cancel out. The output of Psi4 corroborate that, as the partial charge on each oxygen atom is the same within four decimal places, and both take opposite positions in a linear geometry.
There's a similar molecule, but without the possibility of charge separation cancelling out, $\ce{CO}$, carbon monoxide, with a single oxygen. To do a comparison, I created the equivalent input file for it.
memory 4 Gb
set basis aug-cc-pVTZ
molecule {
0 1
C -3.99710 1.44942 0.00000
O -2.86898 1.44942 0.00000
}
optimize('B3LYP-D')
E, wfn = energy('B3LYP-D', return_wfn=True)
oeprop(wfn, "MULLIKEN_CHARGES", "DIPOLE", title = "CO B3LYP-D")
And ran it.
psi4 carbon_monoxide.in
Again the results point to some measure of charge separation.
Properties computed using the CO B3LYP-D density matrix
Nuclear Dipole Moment: (a.u.)
X: 0.0000 Y: 0.0000 Z: 0.0023
Electronic Dipole Moment: (a.u.)
X: 0.0000 Y: 0.0000 Z: 0.0348
Dipole Moment: (a.u.)
X: 0.0000 Y: 0.0000 Z: 0.0371 Total: 0.0371
Dipole Moment: (Debye)
X: 0.0000 Y: 0.0000 Z: 0.0944 Total: 0.0944
Mulliken Charges: (a.u.)
Center Symbol Alpha Beta Spin Total
1 C 2.95397 2.95397 0.00000 0.09206
2 O 4.04603 4.04603 0.00000 -0.09206
Total alpha = 7.00000, Total beta = 7.00000, Total charge = 0.00000
*** Psi4 exiting successfully. Buy a developer a beer!
But this time the dipole was nonzero, with an estimated value around 0.094 debye. The Wikipedia article on carbon monoxide gives us a measured value of 0.122 debye. So we got an estimate around 23% lower than the real value. The difference may arise either as a intrinsic limitation of our model (the science vs. engineering thing), or because I fumbled somewhere either in the input I gave to Psi4 or in my assumptions to treat the problem (always very likely).
It would be interesting to check the literature in the subject, if one wants to go deeper. Anyway, the contrast in the results between $\ce{CO2}$ and $\ce{CO}$ point clearly to mutual cancellation to explain the lack of a dipole in $\ce{CO2}$.